module V8::Error::Protect

Public Instance Methods

protect() { || ... } click to toggle source
# File lib/v8/error.rb, line 95
def protect
  yield
rescue Exception => e
  error = V8::C::Exception::Error(e.message)
  error.SetHiddenValue("rr::Cause", V8::C::External::New(e))
  V8::C::ThrowException(error)
end