summaryrefslogtreecommitdiff
path: root/lib/puppet/parser/functions/validate_cmd.rb
diff options
context:
space:
mode:
authorTravis Fields <travis@puppetlabs.com>2014-10-29 20:03:07 -0700
committerTravis Fields <travis@puppetlabs.com>2014-10-29 20:03:07 -0700
commit6c7da72c0fa6b5e0ed3e5e2d5c80ff27f1e99dee (patch)
tree70285221d2e137c6aa73c5e70cac336ef5b77b57 /lib/puppet/parser/functions/validate_cmd.rb
parent385f0094883bf30c5ec7460bd0b7a1c4c29765a1 (diff)
Fix validate_cmd, previous addition of SystemCallError only works for Puppet 3.7, previous version throw different exception. Wrapping in generic Exception catch all
Diffstat (limited to 'lib/puppet/parser/functions/validate_cmd.rb')
-rw-r--r--lib/puppet/parser/functions/validate_cmd.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/puppet/parser/functions/validate_cmd.rb b/lib/puppet/parser/functions/validate_cmd.rb
index c855c7e..c6136a5 100644
--- a/lib/puppet/parser/functions/validate_cmd.rb
+++ b/lib/puppet/parser/functions/validate_cmd.rb
@@ -42,8 +42,8 @@ module Puppet::Parser::Functions
rescue Puppet::ExecutionFailure => detail
msg += "\n#{detail}"
raise Puppet::ParseError, msg
- rescue SystemCallError => detail
- msg += "\nWin32::Process::SystemCallError #{detail}"
+ rescue Exception => detail
+ msg += "\n#{detail.class.name} #{detail}"
raise Puppet::ParseError, msg
ensure
tmpfile.unlink