-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
Closed
Labels
c++Issues and PRs that require attention from people who are familiar with C++.Issues and PRs that require attention from people who are familiar with C++.good first issueIssues that are suitable for first-time contributors.Issues that are suitable for first-time contributors.node-apiIssues and PRs related to the Node-API.Issues and PRs related to the Node-API.
Description
- Subsystem: n-api
Unless I'm missing something, #16201 should've also updated
Lines 927 to 934 in c5a49e1
| // you must update this assert to reference the last message | |
| // in the napi_status enum each time a new error message is added. | |
| // We don't have a napi_status_last as this would result in an ABI | |
| // change each time a message was added. | |
| static_assert( | |
| node::arraysize(error_messages) == napi_escape_called_twice + 1, | |
| "Count of error messages must match count of error values"); | |
| CHECK_LE(env->last_error.error_code, napi_escape_called_twice); |
Lines 889 to 901 in c5a49e1
| const char* error_messages[] = {nullptr, | |
| "Invalid argument", | |
| "An object was expected", | |
| "A string was expected", | |
| "A string or symbol was expected", | |
| "A function was expected", | |
| "A number was expected", | |
| "A boolean was expected", | |
| "An array was expected", | |
| "Unknown failure", | |
| "An exception is pending", | |
| "The async work item was cancelled", | |
| "napi_escape_handle already called on scope"}; |
Line 934 in c5a49e1
| CHECK_LE(env->last_error.error_code, napi_escape_called_twice); |
napi_get_last_error_info right after napi_handle_scope_mismatch occurred.Metadata
Metadata
Assignees
Labels
c++Issues and PRs that require attention from people who are familiar with C++.Issues and PRs that require attention from people who are familiar with C++.good first issueIssues that are suitable for first-time contributors.Issues that are suitable for first-time contributors.node-apiIssues and PRs related to the Node-API.Issues and PRs related to the Node-API.