Exception: CodeModels::ParsingError

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

Direct Known Subclasses

UnknownNodeType

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of ParsingError.



17
18
19
20
21
# File 'lib/codemodels/parsing.rb', line 17

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

Instance Attribute Details

#lineObject (readonly)

Returns the value of attribute line.



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

def line
  @line
end

#nodeObject (readonly)

Returns the value of attribute node.



14
15
16
# File 'lib/codemodels/parsing.rb', line 14

def node
  @node
end

Instance Method Details

#to_sObject



23
24
25
# File 'lib/codemodels/parsing.rb', line 23

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