[#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 to `func`. == Synopsis Declared in `<balst_stacktracetestallocator.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- void setFailureHandler(xref:BloombergLP/balst/StackTraceTestAllocator/FailureHandler-06.adoc[FailureHandler] const& func); ---- == Description Upon construction, the function `failAbort` is associated with this object by default. Note that `func` will be called by this object's destructor if memory is leaked, so it is important that it not throw. 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. == Parameters [cols="1,4"] |=== | Name| Description | *func* | handler invoked when a failure is observed |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#