Sha256: a143cf712c7827f217f41d659411192fbd67cd3249cb4c53697786663666ee60

Contents?: true

Size: 905 Bytes

Versions: 15

Compression:

Stored size: 905 Bytes

Contents

# encoding: utf-8
#
# This file is part of the lazier gem. Copyright (C) 2013 and above Shogun <shogun@cowtech.it>.
# 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 to debug code.
    class Debug < ::RuntimeError
    end

    # This exception is raised from {I18n I18n} if no valid translation are found in the specified path.
    class MissingTranslation < RuntimeError
      # 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.join(", ")}.")
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
lazier-3.5.7 lib/lazier/exceptions.rb
lazier-3.5.6 lib/lazier/exceptions.rb
lazier-3.5.5 lib/lazier/exceptions.rb
lazier-3.5.4 lib/lazier/exceptions.rb
lazier-3.5.3 lib/lazier/exceptions.rb
lazier-3.5.2 lib/lazier/exceptions.rb
lazier-3.5.1 lib/lazier/exceptions.rb
lazier-3.5.0 lib/lazier/exceptions.rb
lazier-3.4.2 lib/lazier/exceptions.rb
lazier-3.4.1 lib/lazier/exceptions.rb
lazier-3.4.0 lib/lazier/exceptions.rb
lazier-3.3.10 lib/lazier/exceptions.rb
lazier-3.3.9 lib/lazier/exceptions.rb
lazier-3.3.8 lib/lazier/exceptions.rb
lazier-3.3.7 lib/lazier/exceptions.rb