Class: PartyFoul::RacklessExceptionHandler

Inherits:
ExceptionHandler show all
Defined in:
lib/party_foul/rackless_exception_handler.rb

Instance Attribute Summary

Attributes inherited from ExceptionHandler

#rendered_issue

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ExceptionHandler

#create_issue, #find_issue, #run, #update_issue

Constructor Details

#initialize(exception, env) ⇒ RacklessExceptionHandler

Uses the Rackless IssueRenderer for a rackless environment

Parameters:

  • (Exception, Hash)


14
15
16
# File 'lib/party_foul/rackless_exception_handler.rb', line 14

def initialize(exception, env)
  self.rendered_issue = PartyFoul::IssueRenderers::Rackless.new(exception, env)
end

Class Method Details

.handle(exception, env) ⇒ Object

This handler will pass the exception and working environment from Rack off to a processor. The default PartyFoul processor will work synchronously. Processor adapters can be written to push this logic to a background job if desired.

Parameters:

  • (Exception, Hash)


7
8
9
# File 'lib/party_foul/rackless_exception_handler.rb', line 7

def self.handle(exception, env)
  self.new(exception, clean_env(env)).run
end