Throw on App construction failure

This commit is contained in:
Alex Hultman 2019-02-10 12:39:00 +01:00
parent c4cddb9477
commit df9c251bf0
2 changed files with 8 additions and 1 deletions

View File

@ -273,6 +273,13 @@ void uWS_App(const FunctionCallbackInfo<Value> &args) {
app = new APP;
}
/* Throw if we failed to construct the app */
if (app->constructorFailed()) {
delete app;
args.GetReturnValue().Set(isolate->ThrowException(String::NewFromUtf8(isolate, "App construction failed")));
return;
}
appTemplate->InstanceTemplate()->SetInternalFieldCount(1);
/* All the http methods */

@ -1 +1 @@
Subproject commit 02f20bf0307549cd126b582a2ad1fcf2d0180a58
Subproject commit b6173d68b4a707f248a232c4b67dc5d86da60f61