diff --git a/src/AppWrapper.h b/src/AppWrapper.h index f5660bf..290c7c5 100644 --- a/src/AppWrapper.h +++ b/src/AppWrapper.h @@ -273,6 +273,13 @@ void uWS_App(const FunctionCallbackInfo &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 */ diff --git a/uWebSockets b/uWebSockets index 02f20bf..b6173d6 160000 --- a/uWebSockets +++ b/uWebSockets @@ -1 +1 @@ -Subproject commit 02f20bf0307549cd126b582a2ad1fcf2d0180a58 +Subproject commit b6173d68b4a707f248a232c4b67dc5d86da60f61