Parent

Methods

Included Modules

Class Index [+]

Quicksearch

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 8
 8:       def call(exception, locale, key, options)
 9:         if exception.is_a?(MissingTranslation)
10:           options[:rescue_format] == :html ? exception.html_message : exception.message
11:         elsif exception.is_a?(Exception)
12:           raise exception
13:         else
14:           throw :exception, exception
15:         end
16:       end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.