Exception: CodeModels::ParsingError

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

Direct Known Subclasses

UnknownNodeType

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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



47
48
49
50
51
# File 'lib/codemodels/parser.rb', line 47

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

Instance Attribute Details

#lineObject (readonly)

Returns the value of attribute line.



45
46
47
# File 'lib/codemodels/parser.rb', line 45

def line
  @line
end

#nodeObject (readonly)

Returns the value of attribute node.



44
45
46
# File 'lib/codemodels/parser.rb', line 44

def node
  @node
end

Instance Method Details

#to_sObject



53
54
55
# File 'lib/codemodels/parser.rb', line 53

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