UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FormatStringSanErrors.inl
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3/*
4 This file enables inlining the 'visitation' of possible FormatStringSan errors. Inlining is
5 required because, without it, compiler output for malformed format strings would not include
6 details of the specific error.
7 */
8
9X(SNeedsDereferencedNarrowString, "'%s' expects dereferenced `FAnsiString` or `FUtf8String`.")
14X(SNeedsNarrowCharPtrArgButGotWide, "'%s' expects `ANSICHAR*` or `UTF8CHAR*` but got `TCHAR*`; use '%ls'.")
36X(PNeedsPointerArg, "'%p' expects a pointer.")
37X(FNeedsFloatOrDoubleArg, "'%f' expects `float` or `double`.")
38X(InvalidFormatSpec, "unsupported '%' format specifier. (to print a percent sign, write '%%'.)")
39X(NotEnoughArguments, "not enough arguments provided to format string.")
41X(DNeedsIntegerArg, "'%d' expects integral arg (eg. `char`, `int`, `long`, etc.)")
42X(ZNeedsIntegerArg, "'%z' expects integral arg (eg. `char`, `int`, `long`, etc.)")
43X(ZNeedsIntegerSpec, "'%z' must have a suffix (eg. '%zd', '%zu', etc.)")
44X(LNeedsIntegerArg, "'%l[ ]' expects integral arg (eg. `char`, `int`, `long`, etc.)")
45X(HNeedsIntegerArg, "'%h[ ]' expects integral arg (eg. `char`, `int`, `long`, etc.)")
47X(HHNeedsIntegerArg, "'%hh[ ]' expects integral arg (eg. `char`, `int`, `long`, etc.)")
49X(LLNeedsIntegerArg, "'%ll[ ]' expects integral arg (eg. `char`, `int`, `long`, etc.)")
50X(I64BadSpec, "'%I' must appear as '%I64' with an integral suffix (eg. '%I64d', '%I64u', etc.)")
51X(I64NeedsIntegerArg, "'%I64[ ]' expects integral arg (eg. `char`, `int`, `long`, etc.)")
52X(DynamicLengthSpecNeedsIntegerArg, "dynamic field width specifier '*' expects integral arg (eg. `char`, `int`, `long`, etc.)")
FPlatformTypes::TCHAR TCHAR
Either ANSICHAR or WIDECHAR, depending on whether the platform supports wide characters or the requir...
Definition Platform.h:1135
FPlatformTypes::UTF8CHAR UTF8CHAR
An 8-bit character containing a UTF8 (Unicode, 8-bit, variable-width) code unit.
Definition Platform.h:1137
FPlatformTypes::ANSICHAR ANSICHAR
An ANSI character. Normally a signed type.
Definition Platform.h:1131
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
s expects dereferenced FString s expects ANSICHAR *or UTF8CHAR s expects ANSICHAR *or UTF8CHAR *but got TCHAR *use ls S expects dereferenced FAnsiString or FUtf8String S expects character pointer but got S expects ANSICHAR *or UTF8CHAR S expects ANSICHAR *or UTF8CHAR *but got TCHAR *use s hs expects dereferenced FAnsiString or FUtf8String hs expects ANSICHAR *or UTF8CHAR hs expects ANSICHAR *or UTF8CHAR *but got TCHAR *use s ls expects character pointer but got ls expects TCHAR ls expects TCHAR *but got ANSICHAR *or UTF8CHAR *use hs c expects ANSICHAR or UTF8CHAR p expects a pointer unsupported format specifier(to print a percent sign, write '%%'.)") X(NotEnoughArguments
s expects dereferenced FString s expects ANSICHAR *or UTF8CHAR s expects ANSICHAR *or UTF8CHAR *but got TCHAR *use ls S expects dereferenced FAnsiString or FUtf8String S expects character pointer but got S expects ANSICHAR *or UTF8CHAR S expects ANSICHAR *or UTF8CHAR *but got TCHAR *use s hs expects dereferenced FAnsiString or FUtf8String hs expects ANSICHAR *or UTF8CHAR hs expects ANSICHAR *or UTF8CHAR *but got TCHAR *use s ls expects character pointer but got ls expects TCHAR ls expects TCHAR *but got ANSICHAR *or UTF8CHAR *use hs c expects ANSICHAR or UTF8CHAR p expects a pointer unsupported format not enough arguments provided to format string d expects integral z expects integral z must have a suffix(eg. '%zd', '%zu', etc.)") X(LNeedsIntegerArg
s expects dereferenced FString s expects ANSICHAR *or UTF8CHAR s expects ANSICHAR *or UTF8CHAR *but got TCHAR *use ls S expects dereferenced FAnsiString or FUtf8String S expects character pointer but got S expects ANSICHAR *or UTF8CHAR S expects ANSICHAR *or UTF8CHAR *but got TCHAR *use s hs expects dereferenced FAnsiString or FUtf8String hs expects ANSICHAR *or UTF8CHAR hs expects ANSICHAR *or UTF8CHAR *but got TCHAR *use s ls expects character pointer but got ls expects TCHAR ls expects TCHAR *but got ANSICHAR *or UTF8CHAR *use hs c expects ANSICHAR or UTF8CHAR p expects a pointer unsupported format not enough arguments provided to format string d expects integral arg(eg. `char`, `int`, `long`, etc.)") X(ZNeedsIntegerArg
s expects dereferenced FString s expects ANSICHAR *or UTF8CHAR s expects ANSICHAR *or UTF8CHAR *but got TCHAR *use ls S expects dereferenced FAnsiString or FUtf8String S expects character pointer but got character(Is there an extra ' *' somewhere?)") X(CapitalSNeedsNarrowCharPtrArg
#define X(Name, Desc)
Definition FormatStringSan.h:47