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 /** @brief An Error component which stores a C++ stack trace in its message upon construction. */
20 class MCRO_API FCppStackTrace : public IPlainTextComponent
21 {
22 public:
23 /**
24 * @param numAdditionalStackFramesToIgnore
25 * Ignore stack frames which might be irrelevant for the error report
26 *
27 * @param fastWalk
28 * Use fast stack trace walking instead of accurate
29 *
30 * @param stackFramesIgnoreDefaultOffset
31 * A default offset applied to ignore-stack-frames which accounts for the facilities of IError. Only set this
32 * parameter when you need introspection into IError functions for some very unlikely reasons. Following frames
33 * are ignored:
34 * - FCppStackTrace (this constructor)
35 */
37 int32 numAdditionalStackFramesToIgnore = 0,
38 bool fastWalk = !UE_BUILD_DEBUG,
39 int32 stackFramesIgnoreDefaultOffset = 1
40 );
41 };
42}
An Error component which stores a C++ stack trace in its message upon construction.
FCppStackTrace(int32 numAdditionalStackFramesToIgnore=0, bool fastWalk=!UE_BUILD_DEBUG, int32 stackFramesIgnoreDefaultOffset=1)
An error component which displays only its Message, used as simple modular plain text storage.
Contains utilities for structured error handling.
Definition Error.Fwd.h:19