Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
diff --git a/test/addons/async-hello-world/binding.cc b/test/addons/async-hello-world/binding.cc
index da2bd41..5ddd61f 100644
--- a/test/addons/async-hello-world/binding.cc
+++ b/test/addons/async-hello-world/binding.cc
@@ -44,13 +44,11 @@ void AfterAsync(uv_work_t* r) {
v8::Local<v8::Function>::New(isolate, req->callback);
callback->Call(isolate->GetCurrentContext()->Global(), 2, argv);
+ printf("did rethrow: %s\n", !try_catch.ReThrow().IsEmpty() ? "true" : "false");
+
// cleanup
req->callback.Reset();
delete req;
-
- if (try_catch.HasCaught()) {
- node::FatalException(isolate, try_catch);
- }
}
void Method(const v8::FunctionCallbackInfo<v8::Value>& args) {
diff --git a/test/addons/async-hello-world/test.js b/test/addons/async-hello-world/test.js
index fbd0d7e..e185e80 100644
--- a/test/addons/async-hello-world/test.js
+++ b/test/addons/async-hello-world/test.js
@@ -4,7 +4,5 @@ const assert = require('assert');
const binding = require(`./build/${common.buildType}/binding`);
binding(5, common.mustCall(function(err, val) {
- assert.strictEqual(err, null);
- assert.strictEqual(val, 10);
- process.nextTick(common.mustCall());
+ throw new Error('ah crap');
}));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.