mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-10 20:13:24 -08:00
[Crash] Add lifecycle breadcrumbs for unattributable native crashes
Co-authored-by: sentry[bot] <39604003+sentry[bot]@users.noreply.github.com>
This commit is contained in:
parent
40ebd22549
commit
59db732abd
6 changed files with 61 additions and 0 deletions
|
|
@ -418,6 +418,16 @@ TEST(CrashReporterTest, BeginSessionEndSessionRoundTripReportsClean)
|
|||
reporter.endSession();
|
||||
}
|
||||
|
||||
TEST(CrashReporterTest, AddBreadcrumbIsSafeWithoutInitAndWithNullArguments)
|
||||
{
|
||||
// Breadcrumbs are emitted from GUI slots and QtConcurrent workers regardless of whether
|
||||
// the SDK was initialised (empty DSN, Never consent, OFF builds); none of these may crash.
|
||||
CrashReporter::addBreadcrumb("card_db", "card database snapshot swapped in");
|
||||
CrashReporter::addBreadcrumb(nullptr, "message");
|
||||
CrashReporter::addBreadcrumb("category", nullptr);
|
||||
SUCCEED();
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
int main(int argc, char **argv)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue