Sha256: c63e02f117f50dfe24adc8aeffd9be7e9ef38e10522d2dba09a4e1abf5f495a5

Contents?: true

Size: 892 Bytes

Versions: 8

Compression:

Stored size: 892 Bytes

Contents

module Valise
  module Errors
    class Error < ::StandardError; end

    class PathOutsideOfRoot < Error; end
    class PathNotInRoot < Error; end
    class PathNotFound < Error; end
    class ReadOnly < Error; end
    class NotFound < Error; end
    class VirtualSearchPath < Error; end
    class MalformedTree < Error; end
    class RootNotInSet < Error; end
    class UnderIndented < Error; end
    class NoMatchingPath < Error; end

    class UnregisteredStrategy < Error
      def initialize(klass, type)
        super("No #{klass} strategy is registered for #{type.inspect}")
      end
    end

    class CantPopulate < Error
      def initialize(item, cause)
        @item = item
        @original_exception = cause
        super("Couldn't populate #{item.segments.inspect}: #{cause.class}: #{cause.message}")
      end

      attr_reader :item, :original_exception
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
valise-1.2.1 lib/valise/errors.rb
valise-1.2.0 lib/valise/errors.rb
valise-1.1.4 lib/valise/errors.rb
valise-1.1.3 lib/valise/errors.rb
valise-1.1.2 lib/valise/errors.rb
valise-1.1.1 lib/valise/errors.rb
valise-1.1.0 lib/valise/errors.rb
valise-1.0.0 lib/valise/errors.rb