提交 5890ced1 编写于 作者: X xyctka@gmail.com

Better class name

上级 74fa0d3d
...@@ -870,7 +870,7 @@ In other contexts you might want to change this behaviour, though. E.g. the defa ...@@ -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
...@@ -881,7 +881,7 @@ module I18n ...@@ -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.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册