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.
Synopsis
Declared in <bsls_review.h>
class Review;
Description
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 |
|
|
|
Static Member Functions
Name |
Description |
|
Emulate the invocation of the standard |
Log a message to |
|
|
Use the specified |
|
Throw an |
Invoke the currently installed review‐failure handler function with the specified |
|
Disable all subsequent calls to |
|
Make the specified handler |
|
Increment the specified |
|
Return the address of the currently installed review‐failure handler function. Note that the initial value of the review‐failure handler is the |
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 |
An object of this class saves the current review handler and installs the one specified on construction. On destruction, the original review handler is restored. Note that two objects of this class cannot be safely used concurrently from two separate threads (but may of course appear sequentially, including in nested blocks and function invocations within a single thread). Note that the behavior of objects of this class is unaffected by the ( |
Created with MrDocs