MCRO
C++23 utilities for Unreal Engine.
Loading...
Searching...
No Matches
CppStackTrace.h
Go to the documentation of this file.
1/** @noop License Comment
2 * @file
3 * @copyright
4 * This Source Code is subject to the terms of the Mozilla Public License, v2.0.
5 * If a copy of the MPL was not distributed with this file You can obtain one at
6 * https://mozilla.org/MPL/2.0/
7 *
8 * @author David Mórász
9 * @date 2025
10 */
11
12#pragma once
13
14#include "CoreMinimal.h"
16
17namespace Mcro::Error
18{
19 /**
20 * An Error component which stores a C++ stack trace in its message upon construction
21 */
22 class MCRO_API FCppStackTrace : public IPlainTextComponent
23 {
24 public:
25 /**
26 * @param numAdditionalStackFramesToIgnore
27 * Ignore stack frames which might be irrelevant for the error report
28 *
29 * @param fastWalk
30 * Use fast stack trace walking instead of accurate
31 *
32 * @param stackFramesIgnoreDefaultOffset
33 * A default offset applied to ignore-stack-frames which accounts for the facilities of IError. Only set this
34 * parameter when you need introspection into IError functions for some very unlikely reasons. Following frames
35 * are ignored:
36 * - FCppStackTrace (this constructor)
37 */
39 int32 numAdditionalStackFramesToIgnore = 0,
40 bool fastWalk = !UE_BUILD_DEBUG,
41 int32 stackFramesIgnoreDefaultOffset = 1
42 );
43 };
44}
FCppStackTrace(int32 numAdditionalStackFramesToIgnore=0, bool fastWalk=!UE_BUILD_DEBUG, int32 stackFramesIgnoreDefaultOffset=1)