Utility that administers the process‐wide review‐failure handler.
Synopsis
Declared in <bsls_review.h>
class Review;
Description
This "utility" class maintains a pointer containing the address of the current review‐failure handler function (of type Review::ViolationHandler) and provides methods to administer this function pointer. The invokeHandler method calls the currently‐installed failure handler. The default installed handler is the Review::failByLog function.
This class also provides a suite of standard failure‐handler functions that are suitable to be installed as the current Review::ViolationHandler function. Note that clients are free to install any of these ("off‐the‐shelf") handlers, or to provide their own ("custom") review‐failure handler function when using this facility. Also note that review‐failure handlers CAN return, unlike assertion failure handlers, though not returning (thus escalating review behavior implicitly to the level of asserts) is acceptable.
Finally, this class defines the constant strings that are used as the reviewLevel in ReviewViolation`s associated with failed `BSLS_REVIEW invocations.
Type Aliases
Name |
Description |
Alias for an atomic integer used to track review failure counts. |
|
Alias for a pointer to a review‐failure handler taking a violation. |
Static Member Functions
Name |
Description |
|
Abort after logging a message for the specified review violation. |
Log a failure message for the specified review violation to stdout. |
|
|
Hang forever after logging a message for the specified violation. |
|
Throw an exception describing the specified review violation. |
Invoke the installed review‐failure handler with the violation. |
|
Disable all subsequent calls to |
|
Install the specified violation handler as the current review handler. |
|
Increment the specified count and return its new periodic value. |
|
Return the address of the currently installed review‐failure handler. |
Static Data Members
Name |
Description |
String identifier ("R‐INV") for |
|
Command‐line option name for the review level setting. |
|
String identifier ("R‐DBG") for |
|
String identifier for the safe review level. |
Friends
Name |
Description |
Guard that temporarily replaces the review failure handler. |
Created with MrDocs