# File lib/v8/error/try.rb, line 3 def try context = V8::Context.current V8::C::TryCatch() do |trycatch| result = yield if trycatch.HasCaught() V8::Error(trycatch.Exception()) else result end end end