Sha256: a9c9abc9031cf90705ba1abbaa064aa073e77b4c278c2fcf0f92be56d1e93b35
Contents?: true
Size: 642 Bytes
Versions: 36
Compression:
Stored size: 642 Bytes
Contents
module Localeapp class ExceptionHandler def self.call(exception, locale, key, options) Localeapp.log(exception.message) # 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, options || {}) end [locale, key].join(', ') else Localeapp.log('Raising exception') raise end end end end I18n.exception_handler = Localeapp::ExceptionHandler
Version data entries
36 entries across 36 versions & 1 rubygems