[#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`. 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. == 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); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#