1
0
Fork 0

"run with --log v8=debug" to see the stacktraces of logged error messages (#10373)

This commit is contained in:
Wilfried Goesgens 2019-11-13 10:24:10 +01:00 committed by Max Neunhöffer
parent b318ca8084
commit 396ceebf0d
1 changed files with 9 additions and 0 deletions

View File

@ -5113,6 +5113,15 @@ void TRI_LogV8Exception(v8::Isolate* isolate, v8::TryCatch* tryCatch) {
LOG_TOPIC("cb0bd", ERR, arangodb::Logger::FIXME) << "!" << l;
}
auto stacktraceV8 =
tryCatch->StackTrace(TRI_IGETC).FromMaybe(v8::Local<v8::Value>());
TRI_Utf8ValueNFC stacktrace(isolate, stacktraceV8);
if (*stacktrace && stacktrace.length() > 0) {
LOG_TOPIC("cb0bf", DEBUG, arangodb::Logger::V8) << "!" <<
"stacktrace: " + std::string(*stacktrace) + "\n";
}
}
}