src: remove unnecessary c_str() conversions in diagnostic messages

PR-URL: https://github.com/nodejs/node/pull/61786
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
This commit is contained in:
Anna Henningsen authored and Antoine du Hamel committed 2026-04-08 23:53:04 +02:00
1 parent 1c2064c1f8
commit 6cda3d30c0
11 files changed
+55 -63

No files matched your search

+2 -4
View File
@@ -156,10 +156,8 @@ static std::string GetErrorSource(Isolate* isolate,
end -= script_start;
}
std::string buf = SPrintF("%s:%i\n%s\n",
filename_string,
linenum,
sourceline.c_str());
std::string buf =
SPrintF("%s:%i\n%s\n", filename_string, linenum, sourceline);
CHECK_GT(buf.size(), 0);
*added_exception_line = true;