UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
ChaosCheck.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
6
7
8#if CHAOS_CHECKED
9#define CHAOS_CHECK(Condition) check(Condition)
10#define CHAOS_ENSURE(Condition) ensure(Condition)
11#define CHAOS_ENSURE_MSG(InExpression, InFormat, ... ) ensureMsgf(InExpression, InFormat, ##__VA_ARGS__)
12
13// #TODO: remove once cooking is working FORT-242999
14// downgrading all severity to Log
15#define CHAOS_LOG(InLog, InSeverity, InFormat, ...) UE_LOG(InLog, Log, InFormat, ##__VA_ARGS__)
16#define CHAOS_CLOG(InExpression, InLog, InSeverity, InFormat, ...) UE_CLOG(InExpression, InLog, Log, InFormat, ##__VA_ARGS__)
17//#define CHAOS_LOG(InLog, InSeverity, InFormat, ...) UE_LOG(InLog, InSeverity, InFormat, ##__VA_ARGS__)
18//#define CHAOS_CLOG(InExpression, InLog, InSeverity, InFormat, ...) UE_CLOG(InExpression, InLog, InSeverity, InFormat, ##__VA_ARGS__)
19
20#else
21#define CHAOS_CHECK(Condition) (!!(Condition))
22#define CHAOS_ENSURE(Condition) (!!(Condition))
23#define CHAOS_ENSURE_MSG(InExpression, InFormat, ... ) (!!(InExpression))
24#define CHAOS_LOG(InLog, InSeverity, InFormat, ...)
25#define CHAOS_CLOG(InExpression, InLog, InSeverity, InFormat, ...) (!!(InExpression))
26#endif