brew.rb: report some exceptions.

This commit is contained in:
Mike McQuaid 2016-03-28 09:20:48 +01:00
parent 1238c65ba1
commit c5cd206169

View File

@ -130,14 +130,17 @@ rescue Interrupt => e
$stderr.puts # seemingly a newline is typical $stderr.puts # seemingly a newline is typical
exit 130 exit 130
rescue BuildError => e rescue BuildError => e
report_analytics_exception(e)
e.dump e.dump
exit 1 exit 1
rescue RuntimeError, SystemCallError => e rescue RuntimeError, SystemCallError => e
report_analytics_exception(e)
raise if e.message.empty? raise if e.message.empty?
onoe e onoe e
$stderr.puts e.backtrace if ARGV.debug? $stderr.puts e.backtrace if ARGV.debug?
exit 1 exit 1
rescue Exception => e rescue Exception => e
report_analytics_exception(e)
onoe e onoe e
if internal_cmd if internal_cmd
$stderr.puts "#{Tty.white}Please report this bug:" $stderr.puts "#{Tty.white}Please report this bug:"