Skip to content

Instantly share code, notes, and snippets.

@RayParkerBassPlayer
Last active December 20, 2019 18:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RayParkerBassPlayer/c97a36a271cc0fc3d50b1611e962f07d to your computer and use it in GitHub Desktop.
Save RayParkerBassPlayer/c97a36a271cc0fc3d50b1611e962f07d to your computer and use it in GitHub Desktop.
Default Exception Handling, Rails
rescue_from Exception, :with => :handle_exceptions
def handle_exceptions(exception)
cookies[:exception] = exception.message
Rails.logger.error exception.backtrace.join("\n")
redirect_to error_page_path
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment