def handle_exception(handling, exception, locale, key, options)
      case handling
      when :raise
        raise exception.respond_to?(:to_exception) ? exception.to_exception : exception
      when :throw
        throw :exception, exception
      else
        case handler = options[:exception_handler] || config.exception_handler
        when Symbol
          send(handler, exception, locale, key, options)
        else
          handler.call(exception, locale, key, options)
        end
      end
    end
def handle_exception(handling, exception, locale, key, options)
      case handling
      when :raise
        raise exception.respond_to?(:to_exception) ? exception.to_exception : exception
      when :throw
        throw :exception, exception
      else
        case handler = options[:exception_handler] || config.exception_handler
        when Symbol
          send(handler, exception, locale, key, options)
        else
          handler.call(exception, locale, key, options)
        end
      end
    end
Any exceptions thrown in translate will be sent to the @@exception_handler
 which can be a Symbol, a Proc or any other Object unless they're forced to
 be raised or thrown (MissingTranslation).

 If exception_handler is a Symbol then it will simply be sent to I18n as
 a method call. A Proc will simply be called. In any other case the
 method #call will be called on the exception_handler object.

 Examples:

   I18n.exception_handler = :custom_exception_handler              # this is the default
   I18n.custom_exception_handler(exception, locale, key, options)  # will be called like this

   I18n.exception_handler = lambda { |*args| ... }                 # a lambda
   I18n.exception_handler.call(exception, locale, key, options)    # will be called like this

   I18n.exception_handler = I18nExceptionHandler.new               # an object
   I18n.exception_handler.call(exception, locale, key, options)    # will be called like this