Exception: V8::JavascriptError

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

Instance Method Summary collapse

Constructor Details

#initialize(v8_message) ⇒ JavascriptError

Returns a new instance of JavascriptError.


81
82
83
84
# File 'lib/v8/context.rb', line 81

def initialize(v8_message)
  super("#{v8_message.Get()}: #{v8_message.GetScriptResourceName()}:#{v8_message.GetLineNumber()}")
  @native = v8_message
end

Instance Method Details

#line_numberObject


94
95
96
# File 'lib/v8/context.rb', line 94

def line_number
  @native.GetLineNumber()
end

#source_lineObject


90
91
92
# File 'lib/v8/context.rb', line 90

def source_line
  @native.GetSourceLine()
end

#source_nameObject


86
87
88
# File 'lib/v8/context.rb', line 86

def source_name
  @native.GetScriptResourceName()      
end