Module: Blacksheep::Decorators::ErrorHandler
- Included in:
- DefaultErrorHandler
- Defined in:
- lib/blacksheep/decorators/error_handler.rb
Instance Method Summary collapse
Instance Method Details
#call ⇒ Object
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
18 19 20 |
# File 'lib/blacksheep/decorators/error_handler.rb', line 18 def handle(exception) raise Blacksheep::Error, 'Subclass responsibility' end |
#perform ⇒ Object
12 13 14 15 16 |
# File 'lib/blacksheep/decorators/error_handler.rb', line 12 def perform(*) super rescue => exception handle(exception) end |