Skip to content

Instantly share code, notes, and snippets.

@GauthamBanasandra
Last active February 27, 2018 09:26
Show Gist options
  • Save GauthamBanasandra/4418fa9b82c8303514aa52f178ec12f5 to your computer and use it in GitHub Desktop.
Save GauthamBanasandra/4418fa9b82c8303514aa52f178ec12f5 to your computer and use it in GitHub Desktop.
Throw exception one after the other
void Bucket::BucketSet<v8::Local<v8::Name>>(
const v8::Local<v8::Name> &name, const v8::Local<v8::Value> &value_obj,
const v8::PropertyCallbackInfo<v8::Value> &info) {
auto isolate = info.GetIsolate();
if (name->IsSymbol()) {
auto js_exception = UnwrapData(isolate)->js_exception;
js_exception->Throw("Symbol data type is not supported");
++bucket_op_exception_count;
return;
}
auto js_exception = UnwrapData(isolate)->js_exception;
js_exception->Throw("exception1");
js_exception->Throw("exception2");
return;
// More code follows.
}
function OnUpdate(doc, meta) {
try {
try {
destination['k'] = 'v';
} catch(e) {
log(e);
}
} catch(f) {
log(f);
}
}
function OnDelete(meta) {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment