Module: Roda::RodaPlugins::ErrorHandler::InstanceMethods
- Defined in:
- lib/roda/plugins/error_handler.rb
Instance Method Summary collapse
-
#_roda_handle_main_route ⇒ Object
If an error occurs, set the response status to 500 and call the error handler.
-
#call ⇒ Object
If an error occurs, set the response status to 500 and call the error handler.
Instance Method Details
#_roda_handle_main_route ⇒ Object
If an error occurs, set the response status to 500 and call the error handler.
85 86 87 88 89 90 91 92 93 |
# File 'lib/roda/plugins/error_handler.rb', line 85 def _roda_handle_main_route begin res = super ensure _roda_after(res) end rescue *opts[:error_handler_classes] => e _handle_error(e) end |
#call ⇒ Object
If an error occurs, set the response status to 500 and call the error handler. Old Dispatch API.
72 73 74 75 76 77 78 79 80 81 |
# File 'lib/roda/plugins/error_handler.rb', line 72 def call # RODA4: Remove begin res = super ensure _roda_after(res) end rescue *opts[:error_handler_classes] => e _handle_error(e) end |