DEP0168:Node-API 回调中的未处理异常
🌐 DEP0168: Unhandled exception in Node-API callbacks
类型:运行时
🌐 Type: Runtime
现在已不推荐在 Node-API 回调中隐式抑制未捕获的异常。
🌐 The implicit suppression of uncaught exceptions in Node-API callbacks is now deprecated.
设置标志 --force-node-api-uncaught-exceptions-policy,以强制 Node.js 在 Node-API 回调中未处理异常时发出 'uncaughtException' 事件。
🌐 Set the flag --force-node-api-uncaught-exceptions-policy to force Node.js
to emit an 'uncaughtException' event if the exception is not handled in
Node-API callbacks.