Created
August 22, 2017 15:35
-
-
Save trevnorris/b86613d712f61bffe23cb0955b0867e1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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