File: errors.rb

package info (click to toggle)
ruby-toml-rb 4.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,864 kB
  • sloc: ruby: 1,398; makefile: 6
file content (17 lines) | stat: -rw-r--r-- 351 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
module TomlRB
  # Parent class for all TomlRB errors
  Error = Class.new(StandardError)

  # Error related to parsing.
  ParseError = Class.new(Error)

  # Overwrite error
  class ValueOverwriteError < Error
    attr_accessor :key

    def initialize(key)
      @key = key
      super("Key #{key.inspect} is defined more than once")
    end
  end
end