Go to the documentation of this file.
16 #ifndef SURGSIM_FRAMEWORK_ASSERTMESSAGE_H
17 #define SURGSIM_FRAMEWORK_ASSERTMESSAGE_H
124 #endif // SURGSIM_FRAMEWORK_ASSERTMESSAGE_H
~AssertMessage() noexcept(false)
Destructor, which may throw an exception if the failure behavior does.
Definition: AssertMessage.h:73
An exception class thrown by SURGSIM_ASSERT() failures and SURGSIM_FAILURE().
Definition: AssertMessage.h:32
An internal message class used for assertion failures.
Definition: AssertMessage.h:45
static void setFailureBehaviorToThrow()
After an assertion has failed, throw a C++ exception.
Definition: AssertMessage.h:93
AssertMessage(const std::shared_ptr< Logger > &logger)
Constructor.
Definition: AssertMessage.h:65
std::string getMessage()
Definition: LogMessageBase.h:83
static void setFailureBehaviorToDeath()
After an assertion has failed, enter the debugger or kill the application in a system-dependent way.
Definition: AssertMessage.h:100
Definition: CompoundShapeToGraphics.cpp:29
Used by assertion, after using this level the program will not be functional at all.
Definition: Logger.h:47
AssertionFailure(const std::string &message)
Constructor.
Definition: AssertMessage.h:37
static DeathCallback m_killMeNow
The callback function that is triggered after an assertion has failed.
Definition: AssertMessage.h:117
LogMessageBase is a base class to be used to customize messages for logging textual information can b...
Definition: LogMessageBase.h:40
static void killApplication(const std::string &errorMessage)
Enter the debugger or kill the application in a system-dependent way.
Definition: AssertMessage.cpp:46
AssertMessage(Logger *logger)
Constructor.
Definition: AssertMessage.h:53
void(* DeathCallback)(const std::string &message)
The type used for the callback function that is triggered after an assertion has failed.
Definition: AssertMessage.h:49
static DeathCallback getFailureCallback()
Get the callback that will currently be called after an assertion has failed.
Definition: AssertMessage.cpp:36
AssertMessage(const std::unique_ptr< Logger > &logger)
Constructor.
Definition: AssertMessage.h:59
void flush()
write the current message to the logger
Definition: LogMessageBase.h:89
static void throwException(const std::string &errorMessage)
Kill the application by throwing an exception.
Definition: AssertMessage.cpp:41
An object that can be used to control logging parameters, such as verbosity and log output destinatio...
Definition: Logger.h:51
static void setFailureCallback(DeathCallback callback)
After an assertion has failed, call some arbitrary function.
Definition: AssertMessage.cpp:31