Better class name

This commit is contained in:
xyctka@gmail.com 2012-04-06 10:04:26 +01:00
parent 74fa0d3db0
commit 5890ced113
1 changed files with 2 additions and 2 deletions

View File

@ -870,7 +870,7 @@ In other contexts you might want to change this behaviour, though. E.g. the defa
<ruby>
module I18n
class JustRaiseHandler < ExceptionHandler
class JustRaiseExceptionHandler < ExceptionHandler
def call(exception, locale, key, options)
if exception.is_a?(MissingTranslation)
raise exception.to_exception
@ -881,7 +881,7 @@ module I18n
end
end
I18n.exception_handler = I18n::JustRaiseHandler.new
I18n.exception_handler = I18n::JustRaiseExceptionHandler.new
</ruby>
This would re-raise only the +MissingTranslationData+ exception, passing all other input to the default exception handler.