aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorMax Howell2009-11-12 01:33:14 +0000
committerMax Howell2009-11-12 01:37:02 +0000
commit00e227ac46ff9ff0f329e771e2f0de2932cfa6bc (patch)
treea50bc58227e23cd8cf8b3c57cb02312b7f2a69b4 /bin
parent6488212a54f099175b6f7e408e71524522005d9c (diff)
downloadbrew-00e227ac46ff9ff0f329e771e2f0de2932cfa6bc.tar.bz2
More tweaking of main exception handler output
Diffstat (limited to 'bin')
-rwxr-xr-xbin/brew24
1 files changed, 15 insertions, 9 deletions
diff --git a/bin/brew b/bin/brew
index 50f5aaf5b..2040bd16f 100755
--- a/bin/brew
+++ b/bin/brew
@@ -250,16 +250,22 @@ rescue SystemExit
rescue Interrupt => e
puts # seemingly a newline is typical
exit 130
+rescue BuildError => e
+ ohai "Backtrace"
+ puts e.backtrace
+ ohai "Environment"
+ dump_config
+ puts "Exit status: #{e.status}"
+ onoe e
+ puts PLEASE_REPORT_BUG
+ exit 1
+rescue RuntimeError, SystemCallError => e
+ onoe e
+ puts e.backtrace if ARGV.debug?
+ exit 1
rescue Exception => e
- fatal = !(RuntimeError === e or SystemCallError === e)
-
onoe e
- if BuildError === e or fatal
- puts "#{Tty.white}Please report this bug to #{Tty.em}#{HOMEBREW_WWW}#{Tty.reset}"
- dump_config
- puts "Exit status: #{e.status}" if BuildError === e
- end
- puts e.backtrace if fatal or ARGV.debug?
-
+ puts PLEASE_REPORT_BUG
+ puts e.backtrace
exit 1
end