Skip to content

Commit ac67315

Browse files
Call error callback on exception
1 parent 1c8cd39 commit ac67315

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

app/controllers/importance/imports_controller.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,10 @@ def import
113113
else
114114
redirect_to (session[:redirect_url] || main_app.root_path), notice: t("importance.success.import_completed")
115115
end
116+
rescue => e
117+
if @importer.error_callback
118+
instance_exec(e, &@importer.error_callback)
119+
end
116120
end
117121
end
118122
end

0 commit comments

Comments
 (0)