napi_fatal_error
NAPI_NO_RETURN void napi_fatal_error(const char* location,
size_t location_len,
const char* message,
size_t message_len); [in] location:发生错误的位置(可选)。[in] location_len:位置的字节长度,如果是以 null 结尾,则为NAPI_AUTO_LENGTH。[in] message:与错误相关的信息。[in] message_len:消息的字节长度,如果是以 null 结尾,则为NAPI_AUTO_LENGTH。
函数调用不返回,进程将终止。
【The function call does not return, the process will be terminated.】
即使存在挂起的 JavaScript 异常,也可以调用此 API。
【This API can be called even if there is a pending JavaScript exception.】