summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMorgan Haskel <morgan@puppetlabs.com>2014-10-29 15:42:52 -0400
committerMorgan Haskel <morgan@puppetlabs.com>2014-10-29 15:42:52 -0400
commit385f0094883bf30c5ec7460bd0b7a1c4c29765a1 (patch)
tree21b60b8762d81110d100006737ab5e55b5b2bc0d
parentcfc79e9831fb530b4a34bb79db119969b3a166b3 (diff)
parent328aae223f28881746f45d76c778ddbfa3adce39 (diff)
Merge pull request #348 from cyberious/4.3.x
Add proper exception catching of Windows errors when CreateProcess does not succeed
-rw-r--r--lib/puppet/parser/functions/validate_cmd.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/puppet/parser/functions/validate_cmd.rb b/lib/puppet/parser/functions/validate_cmd.rb
index 652aa55..c855c7e 100644
--- a/lib/puppet/parser/functions/validate_cmd.rb
+++ b/lib/puppet/parser/functions/validate_cmd.rb
@@ -42,6 +42,9 @@ module Puppet::Parser::Functions
rescue Puppet::ExecutionFailure => detail
msg += "\n#{detail}"
raise Puppet::ParseError, msg
+ rescue SystemCallError => detail
+ msg += "\nWin32::Process::SystemCallError #{detail}"
+ raise Puppet::ParseError, msg
ensure
tmpfile.unlink
end