|
wiRedPanda
Logic Circuit Simulator
|
Exception type for user-facing circuit errors. More...
#include <Common.h>
Public Member Functions | |
| QString | englishMessage () const |
| Returns the English (non-translated) message for logging and crash reports. | |
| const char * | file () const |
| Returns the source file where the exception was thrown, or nullptr. | |
| int | line () const |
| Returns the source line where the exception was thrown, or 0. | |
| Pandaception (const QString &translatedMessage, const QString &englishMessage, const char *file=nullptr, int line=0) | |
| Constructs the exception with throw-site location for Sentry. | |
| ~Pandaception () override | |
Exception type for user-facing circuit errors.
Pandaception carries both a translated message (for display in the UI) and the original English message (for logging and Sentry reports). Throw it via the PANDACEPTION() macro to take advantage of Qt's tr() mechanism.
|
explicit |
Constructs the exception with throw-site location for Sentry.
| translatedMessage | Localized message shown to the user. |
| englishMessage | English message for logging/Sentry. |
| file | Source file where the exception was thrown (FILE). |
| line | Source line where the exception was thrown (LINE). |
Definition at line 34 of file Common.cpp.
References englishMessage(), file(), and line().
|
overridedefault |
Out-of-line virtual destructor acts as the class's key function so the Itanium C++ ABI emits the typeinfo and vtable in exactly one TU (Common.cpp) with strong external linkage. Without this, every TU that throws PANDACEPTION emits its own weak typeinfo, and on macOS ld64 can leave per-TU hidden copies un-coalesced — breaking catch (const std::exception &) in Application::notify because the throw and catch sites end up with different type_info* pointers (libc++abi requires pointer equality, unlike libstdc++ which falls back to typeinfo-name strcmp). See .claude/SENTRY_TRIAGE.md §A25.
| QString Pandaception::englishMessage | ( | ) | const |
Returns the English (non-translated) message for logging and crash reports.
Definition at line 50 of file Common.cpp.
Referenced by Pandaception().
| const char * Pandaception::file | ( | ) | const |
Returns the source file where the exception was thrown, or nullptr.
Definition at line 55 of file Common.cpp.
Referenced by Pandaception().
| int Pandaception::line | ( | ) | const |
Returns the source line where the exception was thrown, or 0.
Definition at line 60 of file Common.cpp.
Referenced by Pandaception().