Permalink
Browse files

Exit with RC_TEMP if exception is thrown

  • Loading branch information...
1 parent cceefb2 commit 160621cf0a0ebfda97994a02964a22c0aa85b094 @OhNoMoreGit OhNoMoreGit committed May 1, 2012
Showing with 7 additions and 1 deletion.
  1. +7 −1 allah
View
8 allah
@@ -342,4 +342,10 @@ module Allah
end
end
-main if $0 == __FILE__
+begin
+ main if $0 == __FILE__
+rescue => e
+ $stderr.puts "#{e.backtrace.first}: #{e} (#{e.class})"
+ e.backtrace[1..-1].each { |bt| $stderr.puts " from #{bt}" }
+ exit! RC_TEMP
+end

0 comments on commit 160621c

Please sign in to comment.