[#BloombergLP-bsls-Review]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bsls.adoc[bsls]::Review
:relfileprefix: ../../
:mrdocs:

Utility that administers the process&hyphen;wide review&hyphen;failure handler&period;

== Synopsis

Declared in `&lt;bsls&lowbar;review&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class Review;
----

== Description

This &quot;utility&quot; class maintains a pointer containing the address of the current review&hyphen;failure handler function (of type `Review&colon;&colon;ViolationHandler`) and provides methods to administer this function pointer&period; The `invokeHandler` method calls the currently&hyphen;installed failure handler&period; The default installed handler is the `Review&colon;&colon;failByLog` function&period;

This class also provides a suite of standard failure&hyphen;handler functions that are suitable to be installed as the current `Review&colon;&colon;ViolationHandler` function&period; Note that clients are free to install any of these (&quot;off&hyphen;the&hyphen;shelf&quot;) handlers, or to provide their own (&quot;custom&quot;) review&hyphen;failure handler function when using this facility&period; Also note that review&hyphen;failure handlers CAN return, unlike assertion failure handlers, though not returning (thus escalating review behavior implicitly to the level of asserts) is acceptable&period;

Finally, this class defines the constant strings that are used as the `reviewLevel` in `ReviewViolation`s associated with failed `BSLS&lowbar;REVIEW` invocations&period;

== 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&period;
| xref:BloombergLP/bsls/Review/ViolationHandler-06.adoc[`ViolationHandler`] 
| Alias for a pointer to a review&hyphen;failure handler taking a violation&period;
|===


== 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&period;
| xref:BloombergLP/bsls/Review/failByLog.adoc[`failByLog`] 
| Log a failure message for the specified review violation to stdout&period;
| xref:BloombergLP/bsls/Review/failBySleep.adoc[`failBySleep`]  [.small]#[noreturn]#
| Hang forever after logging a message for the specified violation&period;
| xref:BloombergLP/bsls/Review/failByThrow.adoc[`failByThrow`]  [.small]#[noreturn]#
| Throw an exception describing the specified review violation&period;
| xref:BloombergLP/bsls/Review/invokeHandler.adoc[`invokeHandler`] 
| Invoke the installed review&hyphen;failure handler with the violation&period;
| xref:BloombergLP/bsls/Review/lockReviewAdministration.adoc[`lockReviewAdministration`] 
| Disable all subsequent calls to `setViolationHandler`&period; Note that this method has no effect on the behavior of a `ReviewFailureHandlerGuard` object&period;
| xref:BloombergLP/bsls/Review/setViolationHandler.adoc[`setViolationHandler`] 
| Install the specified violation handler as the current review handler&period;
| xref:BloombergLP/bsls/Review/updateCount.adoc[`updateCount`] 
| Increment the specified count and return its new periodic value&period;
| xref:BloombergLP/bsls/Review/violationHandler-05.adoc[`violationHandler`] 
| Return the address of the currently installed review&hyphen;failure handler&period;
|===


== Static Data Members

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bsls/Review/k_LEVEL_INVOKE.adoc[`k&lowbar;LEVEL&lowbar;INVOKE`] 
| String identifier (&quot;R&hyphen;INV&quot;) for `BSLS&lowbar;REVIEW&lowbar;INVOKE` failures&period;
| xref:BloombergLP/bsls/Review/k_LEVEL_OPT.adoc[`k&lowbar;LEVEL&lowbar;OPT`] 
| Command&hyphen;line option name for the review level setting&period;
| xref:BloombergLP/bsls/Review/k_LEVEL_REVIEW.adoc[`k&lowbar;LEVEL&lowbar;REVIEW`] 
| String identifier (&quot;R&hyphen;DBG&quot;) for `BSLS&lowbar;REVIEW` failures&period;
| xref:BloombergLP/bsls/Review/k_LEVEL_SAFE.adoc[`k&lowbar;LEVEL&lowbar;SAFE`] 
| String identifier for the safe review level&period;
|===


== Friends

[cols="1,4"]
|===
| Name| Description
| `xref:BloombergLP/bsls/ReviewFailureHandlerGuard.adoc[BloombergLP::bsls::ReviewFailureHandlerGuard]`
| Guard that temporarily replaces the review failure handler&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
