Skip to content
Snippets Groups Projects
Commit 48f260f6 authored by Xu Cheng's avatar Xu Cheng
Browse files

migrator: better exception printing

parent f83d4186
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment