Module: LiquidErrorHandler::Context
- Defined in:
- lib/liquid_error_handler/context.rb
Overview
Prepended to Liquid context to handle any errors that take place during render.
Instance Method Summary collapse
Instance Method Details
#handle_error(error, *_args) ⇒ Object
6 7 8 9 10 11 |
# File 'lib/liquid_error_handler/context.rb', line 6 def handle_error(error, *_args) return super if LiquidErrorHandler.disabled? LiquidErrorHandler.hooks.each { |hook| hook.call(error.cause.nil? ? error : error.cause) } super end |