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.



51
52
53
54
55
56
57
# File 'lib/roda/plugins/error_handler.rb', line 51

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