diff options
| author | Xu Cheng | 2015-08-15 20:37:24 +0800 |
|---|---|---|
| committer | Xu Cheng | 2015-08-15 20:37:24 +0800 |
| commit | 48f260f67455a1e42f8f942acf07466990467477 (patch) | |
| tree | cd59b18081de73b323069de640c29bcd759815f0 /Library | |
| parent | f83d4186083085f7e77de6547c86711ef5dc84b1 (diff) | |
| download | brew-48f260f67455a1e42f8f942acf07466990467477.tar.bz2 | |
migrator: better exception printing
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/migrator.rb | 9 |
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 |
