Class: I18n::JustRaiseExceptionHandler

Inherits:
ExceptionHandler
  • Object
show all
Defined in:
lib/decidim/i18n_exceptions.rb

Instance Method Summary collapse

Instance Method Details

#call(exception, locale, key, options) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/decidim/i18n_exceptions.rb', line 6

def call(exception, locale, key, options)
  if exception.is_a?(MissingTranslationData) || exception.is_a?(MissingTranslation)
    raise exception.to_exception
  end

  super
end