Skip to content

Instantly share code, notes, and snippets.

@bhenderson
Created September 16, 2014 05:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bhenderson/99eb8ce586760295f260 to your computer and use it in GitHub Desktop.
Save bhenderson/99eb8ce586760295f260 to your computer and use it in GitHub Desktop.
diff --git a/lib/autotest.rb b/lib/autotest.rb
index 479b3e9..2695a35 100755
--- a/lib/autotest.rb
+++ b/lib/autotest.rb
@@ -264,7 +264,11 @@ def run
hook :quit
puts
rescue Exception => err
- hook(:died, err) or raise err
+ hook(:died, err) or (
+ warn "Unhandled exception: #{err}"
+ warn err.backtrace.join("\n ")
+ warn "Quitting"
+ )
ensure
Minitest::Server.stop
end
@@ -708,9 +712,4 @@ def self.add_hook name, &block
HOOKS[name] << block
end
- add_hook :died do |at, err|
- warn "Unhandled exception: #{err}"
- warn err.backtrace.join("\n ")
- warn "Quitting"
- end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment