WPSTools : Do not output the backtrace of the main script

This commit is contained in:
erwanlr
2013-04-16 17:52:39 +02:00
parent eca90894e0
commit 4df1c605a2

View File

@@ -32,7 +32,11 @@ begin
exit(0)
rescue => e
puts "[ERROR] #{e.message}"
puts 'Trace :'
puts e.backtrace.join("\n")
unless e.backtrace[0] =~ /main/
puts 'Trace :'
puts e.backtrace.join("\n")
end
exit(1)
end