![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include "Misc/AssertionMacros.h"#include "Misc/VarArgs.h"#include "HAL/UnrealMemory.h"#include "Templates/UnrealTemplate.h"#include "Templates/Atomic.h"#include "Misc/CString.h"#include "Misc/Crc.h"#include "Async/UniqueLock.h"#include "Async/WordMutex.h"#include "AutoRTFM.h"#include "Containers/UnrealString.h"#include "Containers/StringConv.h"#include "GenericPlatform/GenericPlatformStackWalk.h"#include "HAL/PlatformStackWalk.h"#include "Logging/LogMacros.h"#include "CoreGlobals.h"#include "Misc/Parse.h"#include "Misc/ScopeLock.h"#include "Misc/CoreMisc.h"#include "Misc/CommandLine.h"#include "Misc/OutputDeviceRedirector.h"#include "Misc/OutputDeviceError.h"#include "Stats/StatsMisc.h"#include "Misc/CoreDelegates.h"#include "HAL/ExceptionHandling.h"#include "HAL/ThreadHeartBeat.h"#include "HAL/IConsoleManager.h"Classes | |
| class | FErrorHistWriter |
Macros | |
| #define | ASSERT_DISABLE_BACKTRACE_DUE_TO_ASAN 0 |
| #define | FILE_LINE_DESC_ANSI " [File:%hs] [Line: %i] " |
Functions | |
| void | PrintScriptCallstack () |
| FORCENOINLINE void | StaticFailDebugV (const TCHAR *Error, const ANSICHAR *Expression, const ANSICHAR *File, int32 Line, bool bIsEnsure, void *ProgramCounter, const TCHAR *Message, const TCHAR *DescriptionFormat, va_list DescriptionArgs) |
| FORCENOINLINE void VARARGS | StaticFailDebug (const TCHAR *Error, const ANSICHAR *File, int32 Line, void *ProgramCounter, const TCHAR *Message) |
| FORCENOINLINE void VARARGS | StaticFailDebugV (const TCHAR *Error, const ANSICHAR *File, int32 Line, void *ProgramCounter, const TCHAR *DescriptionFormat, va_list DescriptionArgs) |
Variables | |
| int32 | GEnsuresAreErrors = 1 |
| FAutoConsoleVariableRef | CVarEnsuresAreErrors (TEXT("core.EnsuresAreErrors"), GEnsuresAreErrors, TEXT("True means failed ensures are logged as errors. False means they are logged as warnings."), ECVF_Default) |
| bool | GEnsureAlwaysEnabled = true |
| FAutoConsoleVariableRef | CVarEnsureAlwaysEnabled (TEXT("core.EnsureAlwaysEnabled"), GEnsureAlwaysEnabled, TEXT("Set to false to turn ensureAlways into regular ensure"), ECVF_Default) |
| uint8 | GEnsureResetState = 1 |
| FAutoConsoleCommand | CVarResetEnsureState (TEXT("core.ResetEnsureState"), TEXT("Reset all ensures so they will fire again"), FConsoleCommandDelegate::CreateLambda([]() {++GEnsureResetState;})) |
| CORE_API void(* | GPrintScriptCallStackFn )() = nullptr |
| #define ASSERT_DISABLE_BACKTRACE_DUE_TO_ASAN 0 |
| void PrintScriptCallstack | ( | ) |
C Exposed function to print the callstack to ease debugging needs. In an editor build you can call this in the Immediate Window by doing, {,,UnrealEditor-Core}PrintScriptCallstack()
| FORCENOINLINE void VARARGS StaticFailDebug | ( | const TCHAR * | Error, |
| const ANSICHAR * | File, | ||
| int32 | Line, | ||
| void * | ProgramCounter, | ||
| const TCHAR * | Message | ||
| ) |
| FORCENOINLINE void StaticFailDebugV | ( | const TCHAR * | Error, |
| const ANSICHAR * | Expression, | ||
| const ANSICHAR * | File, | ||
| int32 | Line, | ||
| bool | bIsEnsure, | ||
| void * | ProgramCounter, | ||
| const TCHAR * | Message, | ||
| const TCHAR * | DescriptionFormat, | ||
| va_list | DescriptionArgs | ||
| ) |
Prints error to the debug output and copies the error into the global error message.
| FORCENOINLINE void VARARGS StaticFailDebugV | ( | const TCHAR * | Error, |
| const ANSICHAR * | File, | ||
| int32 | Line, | ||
| void * | ProgramCounter, | ||
| const TCHAR * | DescriptionFormat, | ||
| va_list | DescriptionArgs | ||
| ) |
| FAutoConsoleVariableRef CVarEnsureAlwaysEnabled(TEXT("core.EnsureAlwaysEnabled"), GEnsureAlwaysEnabled, TEXT("Set to false to turn ensureAlways into regular ensure"), ECVF_Default) | ( | TEXT("core.EnsureAlwaysEnabled") | , |
| GEnsureAlwaysEnabled | , | ||
| TEXT("Set to false to turn ensureAlways into regular ensure") | , | ||
| ECVF_Default | |||
| ) |
| FAutoConsoleVariableRef CVarEnsuresAreErrors(TEXT("core.EnsuresAreErrors"), GEnsuresAreErrors, TEXT("True means failed ensures are logged as errors. False means they are logged as warnings."), ECVF_Default) | ( | TEXT("core.EnsuresAreErrors") | , |
| GEnsuresAreErrors | , | ||
| TEXT("True means failed ensures are logged as errors. False means they are logged as warnings.") | , | ||
| ECVF_Default | |||
| ) |
| FAutoConsoleCommand CVarResetEnsureState(TEXT("core.ResetEnsureState"), TEXT("Reset all ensures so they will fire again"), FConsoleCommandDelegate::CreateLambda([]() {++GEnsureResetState; })) | ( | TEXT("core.ResetEnsureState") | , |
| TEXT("Reset all ensures so they will fire again") | , | ||
| FConsoleCommandDelegate::CreateLambda([]() {++GEnsureResetState; }) | |||
| ) |
| uint8 GEnsureResetState = 1 |
| int32 GEnsuresAreErrors = 1 |
Use this CVar to control whether ensures count as errors or warnings. Errors will fail certain processes like cooks, whereas warnings will not.