Sha256: e9f6ef560f48b306dc2f44903e4fd704dbb3e345755c7c6e0625de847dd14a69

Contents?: true

Size: 639 Bytes

Versions: 4

Compression:

Stored size: 639 Bytes

Contents

module WAB

  Error      = Class.new(StandardError) # Base for WAB errors and exceptions.
  ParseError = Class.new(Error)         # Raised as a result of a error while parsing.

  class TypeError < Error
    def initialize(msg='Data values must either be a Hash or an Array')
      super(msg)
    end
  end

  class KeyError < Error
    def initialize(msg='Hash keys must be Symbols')
      super(msg)
    end
  end

  class DuplicateError < Error
    def initialize(key)
      super("#{key} already exists")
    end
  end

  class ForbiddenError < Error
    def initialize(path)
      super("#{path} forbidden")
    end
  end

end # WAB

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
wabur-0.6.2 lib/wab/errors.rb
wabur-0.6.1 lib/wab/errors.rb
wabur-0.6.0 lib/wab/errors.rb
wabur-0.5.0 lib/wab/errors.rb