class HandleErrors
Public Class Methods
new(container, dandy_error, sequel)
click to toggle source
Calls superclass method
Dandy::HandleErrors::new
# File lib/dandy/generators/templates/actions/common/handle_errors_jet_set.rb, line 2 def initialize(container, dandy_error, sequel) super(container, dandy_error) @sequel = sequel end
Public Instance Methods
call()
click to toggle source
# File lib/dandy/generators/templates/actions/common/handle_errors.rb, line 2 def call # implement your own error handling logic here. # by default let's print the error to standard output puts @dandy_error.message puts @dandy_error.backtrace # use preferred HTTP status code for different cases # i.e. set_http_status(403) for authorization issue set_http_status(500) end