module Roda::RodaPlugins::ErrorHandler::InstanceMethods

  1. lib/roda/plugins/error_handler.rb

Methods

Public Instance

  1. _roda_handle_main_route
  2. call

Public Instance methods

_roda_handle_main_route ()

If an error occurs, set the response status to 500 and call the error handler.

[show source]
   # File lib/roda/plugins/error_handler.rb
85 def _roda_handle_main_route
86   begin
87     res = super
88   ensure
89     _roda_after(res)
90   end
91 rescue *opts[:error_handler_classes] => e
92   _handle_error(e)
93 end
call ()

If an error occurs, set the response status to 500 and call the error handler. Old Dispatch API.

[show source]
   # File lib/roda/plugins/error_handler.rb
72 def call
73   # RODA4: Remove
74   begin
75     res = super
76   ensure
77     _roda_after(res)
78   end
79 rescue *opts[:error_handler_classes] => e
80   _handle_error(e)
81 end