Sha256: 8289e2671e17acc6ba1ea6fee186ab0dd42bde5915b6cc257647c89ebab322d5

Contents?: true

Size: 498 Bytes

Versions: 5

Compression:

Stored size: 498 Bytes

Contents

module Dozuki
  class NotFound < StandardError
    attr_accessor :xpath, :node

    def initialize(msg=nil, opts={})
      super msg
      self.xpath = opts[:xpath]
      self.node = opts[:node]
    end

  end

  class InvalidFormat < StandardError
    attr_accessor :format, :node, :value

    def initialize(opts={})
      super "Cannot parse '#{opts[:value]}' to #{opts[:format]}"
      self.format = opts[:format]
      self.node = opts[:node]
      self.value = opts[:value]
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
dozuki-0.4.0 lib/dozuki/exceptions.rb
dozuki-0.3.0 lib/dozuki/exceptions.rb
dozuki-0.2.0 lib/dozuki/exceptions.rb
dozuki-0.1.0 lib/dozuki/exceptions.rb
dozuki-0.0.3 lib/dozuki/exceptions.rb