]> git.cworth.org Git - sup/commitdiff
move sup-exception-log code so that it captures everything
authorwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Thu, 8 Nov 2007 01:08:07 +0000 (01:08 +0000)
committerwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Thu, 8 Nov 2007 01:08:07 +0000 (01:08 +0000)
git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@680 5c8cc53c-5e98-4d25-b20a-d8db53a31250

bin/sup
lib/sup.rb

diff --git a/bin/sup b/bin/sup
index 8beca936c4cf8e26ff8a42838f0abb3411ccd938..c3ae75cf80140639a69310d6368bfcb3f55c67c9 100644 (file)
--- a/bin/sup
+++ b/bin/sup
@@ -311,6 +311,10 @@ ensure
 end
 
 if $exception 
+  File.open("sup-exception-log.txt", "w") do |f|
+    f.puts "--- #{e.class.name} at #{Time.now}"
+    f.puts e.message, e.backtrace
+  end
   $stderr.puts <<EOS
 ----------------------------------------------------------------
 I'm very sorry, but it seems that an error occurred in Sup. 
index e66b27f7ac77745ca65b0ab2e359480d899e028e..7702953aa9bf12efd80d7582d91e0fd0b349f474 100644 (file)
@@ -69,10 +69,6 @@ module Redwood
         begin
           yield
         rescue Exception => e
-          File.open("sup-exception-log.txt", "w") do |f|
-            f.puts "--- #{e.class.name} at #{Time.now}"
-            f.puts e.message, e.backtrace
-          end
           $exception ||= e
           raise
         end