We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 966b23a commit fc3a35bCopy full SHA for fc3a35b
packages/host/cpp/RuntimeNodeApi.cpp
@@ -127,11 +127,16 @@ void napi_fatal_error(const char* location,
127
size_t location_len,
128
const char* message,
129
size_t message_len) {
130
- log_error("Fatal error in Node-API: %.*s: %.*s",
131
- static_cast<int>(location_len),
132
- location,
133
- static_cast<int>(message_len),
134
- message);
+ if (location && location_len) {
+ log_error("Fatal Node-API error: %.*s %.*s",
+ static_cast<int>(location_len),
+ location,
+ static_cast<int>(message_len),
135
+ message);
136
+ } else {
137
+ log_error(
138
+ "Fatal Node-API error: %.*s", static_cast<int>(message_len), message);
139
+ }
140
abort();
141
}
142
0 commit comments