class I18n::ExceptionHandler
Note that the exception handler is not called when the option :raise was given.
was caught the handler returns an error message string containing the key/scope.
MissingTranslationData exceptions are re-raised. When a MissingTranslationData
Handles exceptions raised in the backend. All exceptions except for
def call(exception, locale, key, options)
def call(exception, locale, key, options) if exception.is_a?(MissingTranslationData) # # TODO: this block is to be replaced by `exception.message` when # rescue_format is removed if options[:rescue_format] == :html if @rescue_format_deprecation $stderr.puts "[DEPRECATED] I18n's :recue_format option will be removed from a future release. All exception messages will be plain text. If you need the exception handler to return an html format please set or pass a custom exception handler." @rescue_format_deprecation = true end exception.html_message else exception.message end else raise exception end end