Sha256: 0f6cd23a8ae600431643f19a8900e314af2d6092f79289198a453582d07a0bab

Contents?: true

Size: 728 Bytes

Versions: 4

Compression:

Stored size: 728 Bytes

Contents

module Valise
  class Error < ::Exception; end

  class PathOutsideOfRoot < Error; end
  class PathNotInRoot < Error; end
  class PathNotFound < Error; end
  class ReadOnly < Error; end
  class VirtualSearchPath < Error; end
  class MalformedTree < Error; end
  class RootNotInSet < 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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
valise-0.6 lib/valise/errors.rb
valise-0.5 lib/valise/errors.rb
valise-0.4 lib/valise/errors.rb
valise-0.3 lib/valise/errors.rb