Skip to content

Commit

Permalink
Better class name
Browse files Browse the repository at this point in the history
  • Loading branch information
khustochka committed Apr 6, 2012
1 parent 74fa0d3 commit 5890ced
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions guides/source/i18n.textile
Expand Up @@ -870,7 +870,7 @@ In other contexts you might want to change this behaviour, though. E.g. the defa


<ruby> <ruby>
module I18n module I18n
class JustRaiseHandler < ExceptionHandler class JustRaiseExceptionHandler < ExceptionHandler
def call(exception, locale, key, options) def call(exception, locale, key, options)
if exception.is_a?(MissingTranslation) if exception.is_a?(MissingTranslation)
raise exception.to_exception raise exception.to_exception
Expand All @@ -881,7 +881,7 @@ module I18n
end end
end end


I18n.exception_handler = I18n::JustRaiseHandler.new I18n.exception_handler = I18n::JustRaiseExceptionHandler.new
</ruby> </ruby>


This would re-raise only the +MissingTranslationData+ exception, passing all other input to the default exception handler. This would re-raise only the +MissingTranslationData+ exception, passing all other input to the default exception handler.
Expand Down

0 comments on commit 5890ced

Please sign in to comment.