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
86 def _roda_handle_main_route
87   begin
88     res = super
89   ensure
90     _roda_after(res)
91   end
92 rescue *opts[:error_handler_classes] => e
93   _handle_error(e)
94 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
73 def call
74   # RODA4: Remove
75   begin
76     res = super
77   ensure
78     _roda_after(res)
79   end
80 rescue *opts[:error_handler_classes] => e
81   _handle_error(e)
82 end