Exception: Kaiseki::ParseError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/parse_error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(string, options) ⇒ ParseError

Returns a new instance of ParseError.



5
6
7
8
9
10
# File 'lib/parse_error.rb', line 5

def initialize string, options
	super string
	@rule = options[:rule]
	@line = nil
	@column = nil
end

Instance Attribute Details

#columnObject

Returns the value of attribute column.



3
4
5
# File 'lib/parse_error.rb', line 3

def column
  @column
end

#lineObject

Returns the value of attribute line.



3
4
5
# File 'lib/parse_error.rb', line 3

def line
  @line
end

#ruleObject

Returns the value of attribute rule.



3
4
5
# File 'lib/parse_error.rb', line 3

def rule
  @rule
end

Instance Method Details

#verboseObject



12
13
14
# File 'lib/parse_error.rb', line 12

def verbose
	"[#{@line ? @line + 1 : 0}:#{@column ? @column + 1 : 0}] #{to_s} [in #{@rule}]"
end