Skip to content

Commit

Permalink
Reraise the caught exception after sending failure notification
Browse files Browse the repository at this point in the history
  • Loading branch information
mansam committed Apr 4, 2017
1 parent 46f565c commit 011199e
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ def raw_live_migrate(options = {})
rescue => ex
error_message = parse_error_message_from_fog_response(ex.to_s)
Notification.create(:type => :vm_cloud_live_migrate_error, :options => {:instance_name => name, :error_message => error_message})
raise
else
Notification.create(:type => :vm_cloud_live_migrate_success, :options => {:instance_name => name})
end
Expand All @@ -45,6 +46,7 @@ def raw_evacuate(options = {})
rescue => ex
error_message = parse_error_message_from_fog_response(ex.to_s)
Notification.create(:type => :vm_cloud_evacuate_error, :options => {:instance_name => name, :error_message => error_message})
raise
else
Notification.create(:type => :vm_cloud_evacuate_success, :options => {:instance_name => name})
end
Expand Down

0 comments on commit 011199e

Please sign in to comment.