Skip to content

Commit

Permalink
Merge pull request #348 from cyberious/4.3.x
Browse files Browse the repository at this point in the history
Add proper exception catching of Windows errors when CreateProcess does not succeed
  • Loading branch information
Morgan Haskel committed Oct 29, 2014
2 parents cfc79e9 + 328aae2 commit 385f009
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/puppet/parser/functions/validate_cmd.rb
Expand Up @@ -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
Expand Down

0 comments on commit 385f009

Please sign in to comment.