[#BloombergLP-bsls-Review] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bsls.adoc[bsls]::Review :relfileprefix: ../../ :mrdocs: Utility that administers the process‐wide review‐failure handler. == Synopsis Declared in `<bsls_review.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- 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 [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bsls/Review/Count.adoc[`Count`] | Alias for an atomic integer used to track review failure counts. | xref:BloombergLP/bsls/Review/ViolationHandler-06.adoc[`ViolationHandler`] | Alias for a pointer to a review‐failure handler taking a violation. |=== == Static Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bsls/Review/failByAbort.adoc[`failByAbort`] [.small]#[noreturn]# | Abort after logging a message for the specified review violation. | xref:BloombergLP/bsls/Review/failByLog.adoc[`failByLog`] | Log a failure message for the specified review violation to stdout. | xref:BloombergLP/bsls/Review/failBySleep.adoc[`failBySleep`] [.small]#[noreturn]# | Hang forever after logging a message for the specified violation. | xref:BloombergLP/bsls/Review/failByThrow.adoc[`failByThrow`] [.small]#[noreturn]# | Throw an exception describing the specified review violation. | xref:BloombergLP/bsls/Review/invokeHandler.adoc[`invokeHandler`] | Invoke the installed review‐failure handler with the violation. | xref:BloombergLP/bsls/Review/lockReviewAdministration.adoc[`lockReviewAdministration`] | Disable all subsequent calls to `setViolationHandler`. Note that this method has no effect on the behavior of a `ReviewFailureHandlerGuard` object. | xref:BloombergLP/bsls/Review/setViolationHandler.adoc[`setViolationHandler`] | Install the specified violation handler as the current review handler. | xref:BloombergLP/bsls/Review/updateCount.adoc[`updateCount`] | Increment the specified count and return its new periodic value. | xref:BloombergLP/bsls/Review/violationHandler-05.adoc[`violationHandler`] | Return the address of the currently installed review‐failure handler. |=== == Static Data Members [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bsls/Review/k_LEVEL_INVOKE.adoc[`k_LEVEL_INVOKE`] | String identifier ("R‐INV") for `BSLS_REVIEW_INVOKE` failures. | xref:BloombergLP/bsls/Review/k_LEVEL_OPT.adoc[`k_LEVEL_OPT`] | Command‐line option name for the review level setting. | xref:BloombergLP/bsls/Review/k_LEVEL_REVIEW.adoc[`k_LEVEL_REVIEW`] | String identifier ("R‐DBG") for `BSLS_REVIEW` failures. | xref:BloombergLP/bsls/Review/k_LEVEL_SAFE.adoc[`k_LEVEL_SAFE`] | String identifier for the safe review level. |=== == Friends [cols="1,4"] |=== | Name| Description | `xref:BloombergLP/bsls/ReviewFailureHandlerGuard.adoc[BloombergLP::bsls::ReviewFailureHandlerGuard]` | Guard that temporarily replaces the review failure handler. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#