Module: V8::Error::Try

Included in:
Context, Function
Defined in:
lib/v8/error.rb

Instance Method Summary collapse

Instance Method Details

#tryObject



82
83
84
85
86
87
88
89
90
91
# File 'lib/v8/error.rb', line 82

def try
  V8::C::TryCatch() do |trycatch|
    result = yield
    if trycatch.HasCaught()
      raise V8::Error(trycatch)
    else
      result
    end
  end
end