[#BloombergLP-balst-StackTracePrinter-2constructor-03] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balst.adoc[balst]::xref:BloombergLP/balst/StackTracePrinter.adoc[StackTracePrinter]::StackTracePrinter :relfileprefix: ../../../ :mrdocs: Create a `StackTracePrinter` that renders the current call stack when streamed. == Synopsis Declared in `<balst_stacktraceprinter.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- explicit StackTracePrinter( int maxFrames = ‐1, bool demanglingPreferredFlag = true, int additionalIgnoreFrames = 0); ---- == Description Optionally specify `maxFrames` indicating the maximum number of frames to display. If `maxFrames` is ‐1 or unspecified, use a value of at least 1024. The optionally specified `demanglingPreferredFlag` determines whether demangling occurs, on platforms where demangling is available and optional. Optionally specify `additionalIgnoreFrames` which is added to `bsls::StackAddressUtil::k_IGNORE_FRAMES` to ignore the topmost frames of the caller. The behavior is undefined unless `‐1 == maxFrames` or `0 <= maxFrames`, and unless `0 <= additionalIgnoreFrames`. == Parameters [cols="1,4"] |=== | Name| Description | *maxFrames* | maximum number of stack frames to display | *demanglingPreferredFlag* | whether to prefer demangled symbols | *additionalIgnoreFrames* | extra top frames to omit from the trace |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#