module Roda::RodaPlugins::ErrorHandler::InstanceMethods
Private Instance Methods
_route()
click to toggle source
If an error occurs, set the response status to 500 and call the error handler.
Calls superclass method
# File lib/roda/plugins/error_handler.rb, line 51 def _route super rescue => e response.status = 500 super{handle_error(e)} end
handle_error(e)
click to toggle source
By default, have the error handler reraise the error, so using the plugin without installing an error handler doesn’t change behavior.
# File lib/roda/plugins/error_handler.rb, line 61 def handle_error(e) raise e end