MCPcopy Create free account
hub / github.com/couchbase/fleece / writeCrashLog

Method writeCrashLog

Fleece/Support/Backtrace.cc:322–341  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

320
321
322 void Backtrace::writeCrashLog(ostream &out) {
323 Backtrace bt(4);
324 auto xp = current_exception();
325 if (xp) {
326 out << "Uncaught exception:\n\t";
327 try {
328 rethrow_exception(xp);
329 } catch(const exception& x) {
330 const char *name = typeid(x).name();
331 char *unmangled = unmangle(name);
332 out << unmangled << ": " << x.what() << "\n";
333 if (unmangled != name)
334 free(unmangled);
335 } catch (...) {
336 out << "unknown exception type\n";
337 }
338 }
339 out << "Backtrace:";
340 bt.writeTo(out);
341 }
342
343
344 void Backtrace::installTerminateHandler(function<void(const string&)> logger) {

Callers

nothing calls this directly

Calls 2

unmangleFunction · 0.85
writeToMethod · 0.45

Tested by

no test coverage detected