Method: ShortStack::Controller#handle_request_exception

Defined in:
lib/short_stack/controller.rb

#handle_request_exception(error) ⇒ Object

Raises:

  • (error.class)


155
156
157
158
159
160
# File 'lib/short_stack/controller.rb', line 155

def handle_request_exception(error)
  raise(error.class, error.message, error.backtrace) unless Pancake.handle_errors?
  self.status = error.code
  result = instance_exec error, &self.class.handle_exception
  Rack::Response.new(result, status, headers).finish
end