Class: Localeapp::ExceptionHandler
- Inherits:
-
Object
- Object
- Localeapp::ExceptionHandler
- Defined in:
- lib/localeapp/exception_handler.rb
Class Method Summary collapse
Class Method Details
.call(exception, locale, key, options) ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/localeapp/exception_handler.rb', line 3 def self.call(exception, locale, key, ) Localeapp.log(exception.) # Which exact exception is set up by our i18n shims if exception.is_a? Localeapp::I18nMissingTranslationException Localeapp.log("Detected missing translation for key(s) #{key.inspect}") [*key].each do |key| Localeapp.missing_translations.add(locale, key, nil, || {}) end [locale, key].join(', ') else Localeapp.log('Raising exception') raise end end |