[+] SysCheckArgNotNull
[*] finally fix SysPushErrorSyntax
This commit is contained in:
parent
c5ab03cbfc
commit
742c0495d8
@ -163,6 +163,12 @@ namespace Aurora::Debug
|
||||
#define SysPushErrorNet(...) SysPushErrorError(kFailureNet, ## __VA_ARGS__)
|
||||
#define SysPushErrorMem(...) SysPushErrorError(kFailureMemory, ## __VA_ARGS__)
|
||||
|
||||
#if defined(AU_CFG_ID_INTERNAL) || defined(AU_CFG_ID_DEBUG) || defined(AU_INC_ARG_NAMES)
|
||||
#define SysCheckArgNotNull(x, ...) if (!(static_cast<bool>(x))) { SysPushErrorArg(#x "must not be null"); return __VA_ARGS__; }
|
||||
#else
|
||||
#define SysCheckArgNotNull(x, ...) if (!(static_cast<bool>(x))) { SysPushErrorArg(); return __VA_ARGS__; }
|
||||
#endif
|
||||
|
||||
// edge case
|
||||
#define SysPushErrorNested(...) Aurora::Debug::ErrorMakeNested(__VA_ARGS__);
|
||||
|
||||
@ -192,7 +198,7 @@ namespace Aurora::Debug
|
||||
#define SysPushErrorUnimplemented(...) SysPushErrorError(kFailureUnimplemented, ## __VA_ARGS__)
|
||||
#define SysPushErrorSubmission(...) SysPushErrorError(kFailureSubmission, ## __VA_ARGS__)
|
||||
#define SysPushErrorLockError(...) SysPushErrorError(kFailureLockError, ## __VA_ARGS__)
|
||||
#define SysPushErrorSyntax(...) SysPushErrorError(kFailureSyntax, ## __VA_ARGS__)
|
||||
#define SysPushErrorSyntax(...) SysPushErrorError(kFailureSyntaxError, ## __VA_ARGS__)
|
||||
#define SysPushErrorNoAccess(...) SysPushErrorError(kFailureNoAccess, ## __VA_ARGS__)
|
||||
#define SysPushErrorResourceMissing(...) SysPushErrorError(kFailureResourceMissing, ## __VA_ARGS__)
|
||||
#define SysPushErrorResourceLocked(...) SysPushErrorError(kFailureResourceLocked, ## __VA_ARGS__)
|
||||
|
Loading…
Reference in New Issue
Block a user