8000 src: decode native error messages as UTF-8 by joyeecheung · Pull Request #55024 · nodejs/node · GitHub
[go: up one dir, main page]

Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files. < 8000 button type="button" data-view-component="true" class="js-toc-retry btn-link"> Retry
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/node_errors.h
5DAF
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,11 @@ void OOMErrorHandler(const char* location, const v8::OOMDetails& details);
std::string message = SPrintF(format, std::forward<Args>(args)...); \
v8::Local<v8::String> js_code = OneByteString(isolate, #code); \
v8::Local<v8::String> js_msg = \
OneByteString(isolate, message.c_str(), message.length()); \
v8::String::NewFromUtf8(isolate, \
message.c_str(), \
v8::NewStringType::kNormal, \
message.length()) \
.ToLocalChecked(); \
v8::Local<v8::Object> e = v8::Exception::type(js_msg) \
->ToObject(isolate->GetCurrentContext()) \
.ToLocalChecked(); \
Expand Down
0