Sha256: bc6f5d70d7c6f11da8d1fa0eb30a19579d3ec68163f9e50cb901ed6698ccaea8

Contents?: true

Size: 695 Bytes

Versions: 2

Compression:

Stored size: 695 Bytes

Contents

# frozen_string_literal: true

module Dry
  class View
    # Error raised when critical settings are not configured
    #
    # @api private
    class UndefinedConfigError < StandardError
      def initialize(key)
        super("no +#{key}+ configured")
      end
    end

    # Error raised when template could not be found within a view's configured
    # paths
    #
    # @api private
    class TemplateNotFoundError < StandardError
      def initialize(template_name, lookup_paths)
        msg = [
          "Template +#{template_name}+ could not be found in paths:",
          lookup_paths.map { |path| " - #{path}" }
        ].join("\n\n")

        super(msg)
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
dry-view-0.8.0 lib/dry/view/errors.rb
dry-view-0.7.1 lib/dry/view/errors.rb