aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/migrator.rb
diff options
context:
space:
mode:
authorXu Cheng2015-08-15 20:37:24 +0800
committerXu Cheng2015-08-15 20:37:24 +0800
commit48f260f67455a1e42f8f942acf07466990467477 (patch)
treecd59b18081de73b323069de640c29bcd759815f0 /Library/Homebrew/migrator.rb
parentf83d4186083085f7e77de6547c86711ef5dc84b1 (diff)
downloadbrew-48f260f67455a1e42f8f942acf07466990467477.tar.bz2
migrator: better exception printing
Diffstat (limited to 'Library/Homebrew/migrator.rb')
-rw-r--r--Library/Homebrew/migrator.rb9
1 files changed, 5 insertions, 4 deletions
diff --git a/Library/Homebrew/migrator.rb b/Library/Homebrew/migrator.rb
index adcc8cf4a..82af17f02 100644
--- a/Library/Homebrew/migrator.rb
+++ b/Library/Homebrew/migrator.rb
@@ -142,8 +142,9 @@ class Migrator
rescue Interrupt
ignore_interrupts { backup_oldname }
rescue Exception => e
- onoe "error occured while migrating."
- puts e if ARGV.debug?
+ onoe "Error occured while migrating."
+ puts e
+ puts e.backtrace if ARGV.debug?
puts "Backuping..."
ignore_interrupts { backup_oldname }
end
@@ -220,9 +221,9 @@ class Migrator
rescue Exception => e
onoe "An unexpected error occurred during linking"
puts e
- puts e.backtrace
+ puts e.backtrace if ARGV.debug?
ignore_interrupts { keg.unlink }
- raise e
+ raise
end
end