Module: Roda::RodaPlugins::ErrorHandler::ClassMethods

Defined in:
lib/roda/plugins/error_handler.rb

Instance Method Summary collapse

Instance Method Details

#error(&block) ⇒ Object

Install the given block as the error handler, so that if routing the request raises an exception, the block will be called with the exception in the scope of the Roda instance.



45
46
47
48
# File 'lib/roda/plugins/error_handler.rb', line 45

def error(&block)
  define_method(:handle_error, &block)
  private :handle_error
end