Module: Roda::RodaPlugins::ErrorHandler::InstanceMethods

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

Instance Method Summary collapse

Instance Method Details

#callObject

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



54
55
56
57
58
59
60
# File 'lib/roda/plugins/error_handler.rb', line 54

def call
  super
rescue StandardError, ScriptError => e
  res = @_response = self.class::RodaResponse.new
  res.status = 500
  super{handle_error(e)}
end