Sha256: 8760d70db1a762d89da29feef20b41f9aa69ec3c4712ce75f91ba9837999a4ac

Contents?: true

Size: 865 Bytes

Versions: 4

Compression:

Stored size: 865 Bytes

Contents

module Valise
  module Errors
    class Error < ::Exception; 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 WouldClobber < Error
      def initialize(item)
        @item = item
        super("Would clobber #{item.segments.inspect}")
      end

      attr_reader :item
    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

4 entries across 4 versions & 1 rubygems

Version Path
valise-0.8.2 lib/valise/errors.rb
valise-0.8.1 lib/valise/errors.rb
valise-0.8 lib/valise/errors.rb
valise-0.7 lib/valise/errors.rb