Exception: Wexpr::Exception

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/wexpr/exception.rb

Overview

Common base class for Wexpr Exceptions

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(line, column, message) ⇒ Exception

Returns a new instance of Exception.



9
10
11
12
13
14
# File 'lib/wexpr/exception.rb', line 9

def initialize(line, column, message)
	super(message)
	@line = line
	@column = column
	@message = message
end

Instance Attribute Details

#columnObject (readonly)

Returns the value of attribute column.



7
8
9
# File 'lib/wexpr/exception.rb', line 7

def column
  @column
end

#lineObject (readonly)

Returns the value of attribute line.



6
7
8
# File 'lib/wexpr/exception.rb', line 6

def line
  @line
end

Instance Method Details

#to_sObject



16
17
18
# File 'lib/wexpr/exception.rb', line 16

def to_s
	return "#{@line}:#{@column} #{@message}"
end