Module: Roda::RodaPlugins::ErrorHandler::InstanceMethods
- Defined in:
- lib/roda/plugins/error_handler.rb
Instance Method Summary collapse
-
#call ⇒ Object
If an error occurs, set the response status to 500 and call the error handler.
Instance Method Details
#call ⇒ Object
If an error occurs, set the response status to 500 and call the error handler.
64 65 66 67 68 69 70 |
# File 'lib/roda/plugins/error_handler.rb', line 64 def call super rescue *opts[:error_handler_classes] => e res = @_response = self.class::RodaResponse.new res.status = 500 super{handle_error(e)} end |