[#BloombergLP-balst-StackTraceTestAllocator-setFailureHandler]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balst.adoc[balst]::xref:BloombergLP/balst/StackTraceTestAllocator.adoc[StackTraceTestAllocator]::setFailureHandler
:relfileprefix: ../../../
:mrdocs:

Set the failure handler associated with this allocator object to the specified `func`&period; Upon construction, the function `failAbort` is associated with this object by default&period; Note that `func` will be called by this object&apos;s destructor if memory is leaked, so it is important that it not throw&period; Note that in ALL failure situations, errors or warnings will be written to the `ostream` associated with this object prior to the call to the failure handler&period;

== Synopsis

Declared in `&lt;balst&lowbar;stacktracetestallocator&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
setFailureHandler(xref:BloombergLP/balst/StackTraceTestAllocator/FailureHandler-06.adoc[FailureHandler] const& func);
----


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