Module: Blacksheep::Decorators::ErrorHandler

Included in:
DefaultErrorHandler
Defined in:
lib/blacksheep/decorators/error_handler.rb

Instance Method Summary collapse

Instance Method Details

#callObject



6
7
8
9
10
# File 'lib/blacksheep/decorators/error_handler.rb', line 6

def call(*)
  super
rescue => exception
  handle(exception)
end

#handle(exception) ⇒ Object

Raises:



18
19
20
# File 'lib/blacksheep/decorators/error_handler.rb', line 18

def handle(exception)
  raise Blacksheep::Error, 'Subclass responsibility'
end

#performObject



12
13
14
15
16
# File 'lib/blacksheep/decorators/error_handler.rb', line 12

def perform(*)
  super
rescue => exception
  handle(exception)
end