[#BloombergLP-balst-StackTracePrintUtil-logExceptionStackTrace]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balst.adoc[balst]::xref:BloombergLP/balst/StackTracePrintUtil.adoc[StackTracePrintUtil]::logExceptionStackTrace
:relfileprefix: ../../../
:mrdocs:

Log a message using `BSLS&lowbar;LOG` consisting of &quot;About to throw &lt;exceptionName&gt;&period; &lt;message&gt;&quot; followed by a stack trace&period; This function is to be set as an exception &quot;pre throw hook&quot; for the component `bslstl&lowbar;stdexceptutil`&period; If this funciton is set as the pre throw hook, it will be called prior to exceptions being thrown, Note that this function requires considerable disk access and is therefore slow, so it should not be used for frequently&hyphen;occurring exceptions that are expected to be caught and recovered from&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
void
logExceptionStackTrace(
    char const* exceptionName,
    char const* message);
----


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