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

This class provides a guard that will install and uninstall four handlers, one for assertion failure, one for review failure, one for `BSLS&lowbar;PRECONDITIONS&lowbar;BEGIN`, and one for `BSLS&lowbar;PRECONDITIONS&lowbar;END`, within its protected scope&period;

== Synopsis

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

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

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bsls/FuzzTestHandlerGuard/2constructor.adoc[`FuzzTestHandlerGuard`]         [.small]#[constructor]#
| Create a guard object, installing `FuzzTestPreconditionTracker&colon;&colon;handleAssertViolation`, `FuzzTestPreconditionTracker&colon;&colon;handleReviewViolation`, and the `BEGIN&sol;END` handler&period; The behavior is undefined if the current assertion handler is `FuzzTestPreconditionTracker&colon;&colon;handleAssertViolation` or the current review handler is `FuzzTestPreconditionTracker&colon;&colon;handleAssertViolation`&period;
| xref:BloombergLP/bsls/FuzzTestHandlerGuard/2destructor.adoc[`&#126;FuzzTestHandlerGuard`] [.small]#[destructor]#
| Restore the failure handler that was in place when this object was created, reset the precondition `BEGIN&sol;END` handlers to no&hyphen;op, and destroy this guard&period; The behavior is undefined unless the current assertion handler is `FuzzTestPreconditionTracker&colon;&colon;handleAssertViolation` and the current review handler is `FuzzTestPreconditionTracker&colon;&colon;handleAssertViolation`&period;
| xref:BloombergLP/bsls/FuzzTestHandlerGuard/getOriginalAssertionHandler.adoc[`getOriginalAssertionHandler`] 
| Return the original assertion handler&period;
| xref:BloombergLP/bsls/FuzzTestHandlerGuard/getOriginalReviewHandler.adoc[`getOriginalReviewHandler`] 
| Return the original review handler&period;
|===


== Static Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bsls/FuzzTestHandlerGuard/instance.adoc[`instance`] 
| Return the current fuzz test handler guard&period; The behavior is undefined unless a fuzz test handler guard is currently in scope&period;
|===



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