Merge pull request #348 from cyberious/4.3.x
Add proper exception catching of Windows errors when CreateProcess does not succeed
This commit is contained in:
commit
385f009488
1 changed files with 3 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue