Handle exception raised in probe-args callback.

This commit is contained in:
Chris Andrews
2011-02-01 20:16:06 +00:00
parent 37e0fff5b0
commit 68deae27af
+9 -1
View File
@@ -375,8 +375,16 @@ namespace node {
}
// invoke fire callback
TryCatch try_catch;
Local<Function> cb = Local<Function>::Cast(args[1]);
Local<Value> probe_args = cb->Call(Context::GetCurrent()->Global(), 0, NULL);
Local<Value> probe_args = cb->Call(provider->handle_, 0, NULL);
// exception in args callback?
if (try_catch.HasCaught()) {
FatalException(try_catch);
return Undefined();
}
// check return
if (!probe_args->IsArray()) {