Names an abort site before terminating, so a release build without a stack still reports which invariant failed and on which thread.
More...
#include <cstddef>
#include <cstdint>
#include <initializer_list>
#include <span>
|
| void | donner::SetFatalAbortThreadRole (const char *role) |
| | Names the calling thread in later fatal messages, and in a WebAssembly build also in the JavaScript abort hook of the thread's worker until the thread exits.
|
| void | donner::SetFatalAbortRolePublisherForTesting (void(*publisher)(const char *role)) |
| | Replaces how roles reach the JavaScript abort hook, for tests.
|
|
const char * | donner::FatalAbortThreadRole () |
| | The calling thread's role: the last SetFatalAbortThreadRole value, otherwise a role derived from the runtime (browser-main, runtime-main, pthread or native-thread).
|
| std::size_t | donner::FormatFatalAbortMessage (std::span< char > buffer, const char *site, const char *role, std::span< const FatalAbortValue > values) |
| | Formats a fatal message without allocating.
|
| void | donner::FatalAbort (const char *site, std::initializer_list< FatalAbortValue > values={}) |
| | Emits one line naming site, the calling thread's role and values, then calls std::abort().
|
|
|
constexpr const char * | donner::kFatalAbortPrefix = "[donner-fatal] Aborted at site=" |
| | Prefix of every message FatalAbort emits; browser tests match the Aborted in it.
|
Names an abort site before terminating, so a release build without a stack still reports which invariant failed and on which thread.
◆ donner::FatalAbortValue
| struct donner::FatalAbortValue |
One named integer that explains why a fatal site was reached.
| Class Members |
|
const char * |
name |
Static identifier, printed as name=value. |
|
int64_t |
value |
The value that explains the condition. |