Throw on App construction failure
This commit is contained in:
parent
c4cddb9477
commit
df9c251bf0
2 changed files with 8 additions and 1 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue