1. NAPI_NO_RETURN void napi_fatal_error(const char* location,
    2. size_t location_len,
    3. const char* message,
    4. size_t message_len);
    • [in] location: Optional location at which the error occurred.
    • [in] location_len: The length of the location in bytes, or NAPI_AUTO_LENGTH if it is null-terminated.
    • [in] message: The message associated with the error.
    • [in] message_len: The length of the message in bytes, or NAPI_AUTO_LENGTH if it is null-terminated.

    The function call does not return, the process will be terminated.

    This API can be called even if there is a pending JavaScript exception.