Sha256: 4e9e87802d17700988dac9d771da127abd5daa473d5f2159e61a8861a360d859

Contents?: true

Size: 939 Bytes

Versions: 9

Compression:

Stored size: 939 Bytes

Contents

# encoding: utf-8
#
# This file is part of the lazier gem. Copyright (C) 2013 and above Shogun <shogun_panda@me.com>.
# Licensed under the MIT license, which can be found at http://www.opensource.org/licenses/mit-license.php.
#

module Lazier
  # Exceptions for lazier.
  module Exceptions
    # This exception is raised from {Object#debug_dump} when `must_raise` is `true`.
    class Dump < ::RuntimeError
    end

    # This exception is raised from {I18n I18n} if no valid translation are found in the specified path.
    class MissingTranslation < Exception
      # Creates a new missing translation exception.
      #
      # @param locales [Array] The locales that was requested to load.
      # @param path [String] The path where was request to search for translations.
      def initialize(locales, path)
        super("Unable to load any of the following translation in #{path}: #{locales.to_json}.")
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
lazier-2.8.0 lib/lazier/exceptions.rb
lazier-2.7.0 lib/lazier/exceptions.rb
lazier-2.6.7 lib/lazier/exceptions.rb
lazier-2.6.6 lib/lazier/exceptions.rb
lazier-2.6.5 lib/lazier/exceptions.rb
lazier-2.6.4 lib/lazier/exceptions.rb
lazier-2.6.3 lib/lazier/exceptions.rb
lazier-2.6.2 lib/lazier/exceptions.rb
lazier-2.6.1 lib/lazier/exceptions.rb