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
81 def _roda_handle_main_route
82   begin
83     res = super
84   ensure
85     _roda_after(res)
86   end
87 rescue *self.class.error_handler_classes => e
88   _handle_error(e)
89 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
68 def call
69   # RODA4: Remove
70   begin
71     res = super
72   ensure
73     _roda_after(res)
74   end
75 rescue *self.class.error_handler_classes => e
76   _handle_error(e)
77 end