Method: Liquid::Tag::Disableable#disabled_error

Defined in:
lib/liquid/tag/disableable.rb

#disabled_error(context) ⇒ Object



14
15
16
17
18
19
# File 'lib/liquid/tag/disableable.rb', line 14

def disabled_error(context)
  # raise then rescue the exception so that the Context#exception_renderer can re-raise it
  raise DisabledError, "#{tag_name} #{parse_context[:locale].t('errors.disabled.tag')}"
rescue DisabledError => exc
  context.handle_error(exc, line_number)
end