Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathias Buus <mathiasbuus@gmail.com>2018-03-14 05:14:08 +0300
committerMichael Dawson <mdawson@devrus.com>2018-03-20 22:48:14 +0300
commitc1695d8bad09fc61922ec91101736debb2d165db (patch)
treec3214883da34cd76fc358535df0365df5f37828a /src/node_api.h
parent1203b1372592a5067888987080f30b6b9047d150 (diff)
n-api: add napi_fatal_exception
Add function to trigger and uncaught exception. Useful if an async callback throws an exception with no way to recover. PR-URL: https://github.com/nodejs/node/pull/19337 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Diffstat (limited to 'src/node_api.h')
-rw-r--r--src/node_api.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/node_api.h b/src/node_api.h
index 791a8f8725d..aaf002b7584 100644
--- a/src/node_api.h
+++ b/src/node_api.h
@@ -103,6 +103,8 @@ NAPI_EXTERN napi_status
napi_get_last_error_info(napi_env env,
const napi_extended_error_info** result);
+NAPI_EXTERN napi_status napi_fatal_exception(napi_env env, napi_value err);
+
NAPI_EXTERN NAPI_NO_RETURN void napi_fatal_error(const char* location,
size_t location_len,
const char* message,