Exception: LightModels::ParsingError

Inherits:
Exception
  • Object
show all
Defined in:
lib/lightmodels/parsing.rb

Direct Known Subclasses

UnknownNodeType

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(node, msg, line = nil) ⇒ ParsingError



9
10
11
12
13
# File 'lib/lightmodels/parsing.rb', line 9

def initialize(node,msg,line=nil)
  @node = node
  @msg = msg
  @line = lin
end

Instance Attribute Details

#lineObject (readonly)

Returns the value of attribute line.



7
8
9
# File 'lib/lightmodels/parsing.rb', line 7

def line
  @line
end

#nodeObject (readonly)

Returns the value of attribute node.



6
7
8
# File 'lib/lightmodels/parsing.rb', line 6

def node
  @node
end

Instance Method Details

#to_sObject



15
16
17
# File 'lib/lightmodels/parsing.rb', line 15

def to_s
  "#{@msg}, start line: #{@line}"
end