Exception: RSX::SyntaxError

Inherits:
Error
  • Object
show all
Defined in:
lib/rsx/errors.rb

Overview

Raised when a .rsx file cannot be transformed into Ruby.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, path: nil, line: nil, column: nil) ⇒ SyntaxError

Returns a new instance of SyntaxError.



10
11
12
13
14
15
16
# File 'lib/rsx/errors.rb', line 10

def initialize(message, path: nil, line: nil, column: nil)
  @path = path
  @line = line
  @column = column
  location = [path || "(rsx)", line, column].compact.join(":")
  super("#{location}: #{message}")
end

Instance Attribute Details

#columnObject (readonly)

Returns the value of attribute column.



8
9
10
# File 'lib/rsx/errors.rb', line 8

def column
  @column
end

#lineObject (readonly)

Returns the value of attribute line.



8
9
10
# File 'lib/rsx/errors.rb', line 8

def line
  @line
end

#pathObject (readonly)

Returns the value of attribute path.



8
9
10
# File 'lib/rsx/errors.rb', line 8

def path
  @path
end