8000 "run with --log v8=debug" to see the stacktraces of logged error mess… · arangodb/arangodb@396ceeb · GitHub
[go: up one dir, main page]

Skip to content

Commit 396ceeb

Browse files
dothebartneunhoef
authored andcommitted
"run with --log v8=debug" to see the stacktraces of logged error messages (#10373)
1 parent b318ca8 commit 396ceeb

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lib/V8/v8-utils.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5113,6 +5113,15 @@ void TRI_LogV8Exception(v8::Isolate* isolate, v8::TryCatch* tryCatch) {
51135113

51145114
LOG_TOPIC("cb0bd", ERR, arangodb::Logger::FIXME) << "!" << l;
51155115
}
5116+
auto stacktraceV8 =
5117+
tryCatch->StackTrace(TRI_IGETC).FromMaybe(v8::Local<v8::Value>());
5118+
TRI_Utf8ValueNFC stacktrace(isolate, stacktraceV8);
5119+
5120+
if (*stacktrace && stacktrace.length() > 0) {
5121+
LOG_TOPIC("cb0bf", DEBUG, arangodb::Logger::V8) << "!" <<
5122+
"stacktrace: " + std::string(*stacktrace) + "\n";
5123+
}
5124+
51165125
}
51175126
}
51185127

0 commit comments

Comments
 (0)
0