Skip to content

Commit ab04805

Browse files
committed
Allow for easy integration with host app error reporting systems
1 parent 5e4a8f2 commit ab04805

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

app/controllers/better_together/application_controller.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ def user_not_authorized(exception)
3636

3737
def handle_error(exception)
3838
# rubocop:todo Layout/LineLength
39+
40+
# call error reporting
41+
error_reporting(exception)
42+
3943
flash.now[:error] = exception.message # Set the exception message as an error flash message for the current request
4044
# rubocop:enable Layout/LineLength
4145
respond_to do |format|
@@ -48,5 +52,9 @@ def handle_error(exception)
4852
format.html { render 'errors/500', status: :internal_server_error }
4953
end
5054
end
55+
56+
protected
57+
58+
def error_reporting(exception); end
5159
end
5260
end

0 commit comments

Comments
 (0)