Exception: XmlUtils::ParseException

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/xmlutils/node.rb

Direct Known Subclasses

UndefinedNamespaceException

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, line = nil, position = nil) ⇒ ParseException

Returns a new instance of ParseException.



22
23
24
25
26
# File 'lib/xmlutils/node.rb', line 22

def initialize(message, line = nil, position = nil)
  @line = line
  @position = position
  super(message)
end

Instance Attribute Details

#lineObject (readonly)

Returns the value of attribute line.



20
21
22
# File 'lib/xmlutils/node.rb', line 20

def line
  @line
end

#positionObject (readonly)

Returns the value of attribute position.



20
21
22
# File 'lib/xmlutils/node.rb', line 20

def position
  @position
end

Instance Method Details

#to_sObject



28
29
30
31
# File 'lib/xmlutils/node.rb', line 28

def to_s
  base = super
  @line ? "#{base} (line #{@line}, pos #{@position})" : base
end