From c1695d8bad09fc61922ec91101736debb2d165db Mon Sep 17 00:00:00 2001 From: Mathias Buus Date: Wed, 14 Mar 2018 03:14:08 +0100 Subject: 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 Reviewed-By: Colin Ihrig Reviewed-By: Anna Henningsen Reviewed-By: Michael Dawson --- src/node_internals.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/node_internals.h') diff --git a/src/node_internals.h b/src/node_internals.h index 909d5e1790..6439ccc7a2 100644 --- a/src/node_internals.h +++ b/src/node_internals.h @@ -251,6 +251,11 @@ void GetSockOrPeerName(const v8::FunctionCallbackInfo& args) { args.GetReturnValue().Set(err); } +void FatalException(v8::Isolate* isolate, + v8::Local error, + v8::Local message); + + void SignalExit(int signo); #ifdef __POSIX__ void RegisterSignalHandler(int signal, -- cgit v1.2.3