mirror of
https://github.com/nodejs/node.git
synced 2026-11-29 14:27:57 -05:00
esm: refine ERR_REQUIRE_ESM errors
PR-URL: https://github.com/nodejs/node/pull/39175 Reviewed-By: Bradley Farias <bradley.meck@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
1 parent
9b15e5c155
commit
93eff3f5a6
9 files changed
+182
-63
No files matched your search
@@ -215,6 +215,12 @@ void AppendExceptionLine(Environment* env,
|
||||
Local<Object> err_obj;
|
||||
if (!er.IsEmpty() && er->IsObject()) {
|
||||
err_obj = er.As<Object>();
|
||||
// If arrow_message is already set, skip.
|
||||
auto maybe_value = err_obj->GetPrivate(env->context(),
|
||||
env->arrow_message_private_symbol());
|
||||
Local<Value> lvalue;
|
||||
if (!maybe_value.ToLocal(&lvalue) || lvalue->IsString())
|
||||
return;
|
||||
}
|
||||
|
||||
bool added_exception_line = false;
|
||||
|
||||
Reference in new issue
Block a user