module V8

Constants

VERSION

Public Class Methods

Error(exception) click to toggle source
# File lib/v8/error.rb, line 11
def self.Error(exception)
  value = exception.to_ruby
  if !exception.kind_of?(V8::C::Value)
    raise V8::Error.new(exception.to_s, value)
  elsif exception.IsNativeError()
    if football = exception.GetHiddenValue("rr::Football")
      raise football.Value()
    else
      raise V8::Error.new(exception.Get("message").to_ruby, value)
    end
  else
    raise V8::Error.new(exception.ToString().to_ruby, value)
  end
end