func (cs ContextScope) TryCatch(callback func()) error { msg := C.V8_Context_TryCatch(cs.context.self, unsafe.Pointer(&callback)) if msg == nil { return nil } return (*Message)(msg) }
func (cs ContextScope) TryCatch(simple bool, callback func()) string { isSimple := 0 if simple { isSimple = 1 } creport := C.V8_Context_TryCatch(cs.context.self, unsafe.Pointer(&callback), C.int(isSimple)) if creport == nil { return "" } report := C.GoString(creport) C.free(unsafe.Pointer(creport)) return report }