Exception: Ruby2JS::Error

Inherits:
NotImplementedError
  • Object
show all
Defined in:
lib/ruby2js/converter.rb

Instance Method Summary collapse

Constructor Details

#initialize(message, ast) ⇒ Error

Returns a new instance of Error.



5
6
7
8
9
10
11
12
# File 'lib/ruby2js/converter.rb', line 5

def initialize(message, ast)
  if ast.loc
    message += ' at ' + ast.loc.expression.source_buffer.name.to_s
    message += ':' + ast.loc.expression.line.inspect
    message += ':' + ast.loc.expression.column.to_s
  end
  super(message)
end