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:
Morgan Haskel 2014-10-29 15:42:52 -04:00
commit 385f009488

View file

@ -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