An internal message class used for assertion failures.
More...
#include <AssertMessage.h>
|
typedef void(* | DeathCallback) (const std::string &message) |
| The type used for the callback function that is triggered after an assertion has failed.
|
|
|
std::string | getMessage () |
|
void | flush () |
| write the current message to the logger
|
|
An internal message class used for assertion failures.
Dies after logging.
§ AssertMessage() [1/3]
SurgSim::Framework::AssertMessage::AssertMessage |
( |
Logger * |
logger | ) |
|
|
inlineexplicit |
Constructor.
- Parameters
-
logger | Logger used to log this message. |
§ AssertMessage() [2/3]
SurgSim::Framework::AssertMessage::AssertMessage |
( |
const std::unique_ptr< Logger > & |
logger | ) |
|
|
inlineexplicit |
Constructor.
- Parameters
-
logger | Logger used to log this message. |
§ AssertMessage() [3/3]
SurgSim::Framework::AssertMessage::AssertMessage |
( |
const std::shared_ptr< Logger > & |
logger | ) |
|
|
inlineexplicit |
Constructor.
- Parameters
-
logger | Logger used to log this message. |
§ getFailureCallback()
Get the callback that will currently be called after an assertion has failed.
Thread-unsafe if called concurrently from multiple threads, or concurrently with a failing assertion.
- Returns
- The callback.
§ setFailureBehaviorToDeath()
static void SurgSim::Framework::AssertMessage::setFailureBehaviorToDeath |
( |
| ) |
|
|
inlinestatic |
After an assertion has failed, enter the debugger or kill the application in a system-dependent way.
Thread-unsafe if called concurrently from multiple threads, or concurrently with a failing assertion.
§ setFailureBehaviorToThrow()
static void SurgSim::Framework::AssertMessage::setFailureBehaviorToThrow |
( |
| ) |
|
|
inlinestatic |
After an assertion has failed, throw a C++ exception.
Thread-unsafe if called concurrently from multiple threads, or concurrently with a failing assertion.
§ setFailureCallback()
After an assertion has failed, call some arbitrary function.
The callback function should cause the application (or at least the current thread) to terminate.
Thread-unsafe if called concurrently from multiple threads, or concurrently with a failing assertion.
The documentation for this class was generated from the following files: