class I18n::ExceptionHandler
Handles exceptions raised in the backend. All exceptions except for MissingTranslationData exceptions are re-thrown. When a MissingTranslationData was caught the handler returns an error message string containing the key/scope. Note that the exception handler is not called when the option :throw was given.
Public Instance Methods
call(exception, locale, key, options)
click to toggle source
# File lib/i18n/exceptions.rb, line 10 def call(exception, locale, key, options) case exception when MissingTranslation exception.message when Exception raise exception else throw :exception, exception end end