ALib C++ Library
Library Version: 2510 R0
Documentation generated by doxygen
Loading...
Searching...
No Matches
alib::assert::TLD Struct Reference

Description:

Embeds two flags that allow control of whether function assert::Raise halts on errors, respectively warnings. The default is to halt on errors, but not on warnings.
A thread-local instance is given (and internally tested) with function assert::GetHaltFlagAndCounters.

Note that this mechanism is mostly needed for unit-testing. Here, errors may need to be tested to be properly raised.

Definition at line 63 of file assert.inl.

Public Field Index:

size_t CtdErrors = 0
 The number of errors counted for this thread.
 
size_t CtdMessages = 0
 The number of messages counted for this thread.
 
size_t CtdWarnings = 0
 The number of warnings counted for this thread.
 
bool HaltOnErrors = true
 Flag to enable/disable the use of assert(0) if an ALib error was raised.
 
bool HaltOnWarnings = false
 Flag to enable/disable the use of assert(0) if an ALib warning was raised.
 

Field Details:

◆ CtdErrors

size_t alib::assert::TLD::CtdErrors = 0

The number of errors counted for this thread.

Definition at line 72 of file assert.inl.

◆ CtdMessages

size_t alib::assert::TLD::CtdMessages = 0

The number of messages counted for this thread.

Definition at line 78 of file assert.inl.

◆ CtdWarnings

size_t alib::assert::TLD::CtdWarnings = 0

The number of warnings counted for this thread.

Definition at line 75 of file assert.inl.

◆ HaltOnErrors

bool alib::assert::TLD::HaltOnErrors = true

Flag to enable/disable the use of assert(0) if an ALib error was raised.

Definition at line 66 of file assert.inl.

◆ HaltOnWarnings

bool alib::assert::TLD::HaltOnWarnings = false

Flag to enable/disable the use of assert(0) if an ALib warning was raised.

Definition at line 69 of file assert.inl.


The documentation for this struct was generated from the following file: