Exception: Utopia::XNode::ScanError
- Inherits:
-
StandardError
- Object
- StandardError
- Utopia::XNode::ScanError
- Defined in:
- lib/utopia/xnode/scanner.rb
Instance Method Summary collapse
-
#initialize(message, scanner) ⇒ ScanError
constructor
A new instance of ScanError.
- #to_s ⇒ Object
Constructor Details
#initialize(message, scanner) ⇒ ScanError
Returns a new instance of ScanError.
11 12 13 14 15 16 |
# File 'lib/utopia/xnode/scanner.rb', line 11 def initialize(, scanner) @message = @pos = scanner.pos @line = scanner.calculate_line_number end |
Instance Method Details
#to_s ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/utopia/xnode/scanner.rb', line 18 def to_s if @line "Scan Error: #{@message} @ [#{@line[0]}:#{@line[2]}]: #{@line[4]}" else "Scan Error [#{@pos}]: #{@message}" end end |