module Roda::RodaPlugins::ErrorHandler::ClassMethods

  1. lib/roda/plugins/error_handler.rb


Public Instance

  1. error

Public Instance methods

error (&block)

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.

[show source]
   # File lib/roda/plugins/error_handler.rb
63 def error(&block)
64   define_method(:handle_error, &block)
65   private :handle_error
66 end