AuroraRuntime/Include/Aurora/Debug/SysErrors.hpp
Jamie Reece Wilson 4ce49941ff [+] SysCheckNotNullMemory
[+] SysCheckNotNull
[+] SysCheckRetExpNotNull
[+] SysCheckRetExpNotNullMemory
2023-10-24 17:43:00 +01:00

445 lines
27 KiB
C++

/***
Copyright (C) 2021 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: SysErrors.hpp
Date: 2021-6-10
Author: Reece
***/
#pragma once
namespace Aurora::Debug
{
AUKN_SYM void _PushError(AuUInt address, EFailureCategory category, const char *msg, AuUInt16 uLine = 0);
#if defined(AURORA_COMPILER_MSVC)
#define _DBG_RET_ADDR (AuUInt)_ReturnAddress()
#elif defined(AURORA_COMPILER_CLANG)
#define _DBG_RET_ADDR (AuUInt)__builtin_return_address(0)
#else
#define _DBG_RET_ADDR AuUInt(0)
#endif
#if defined(AURORA_COMPILER_MSVC)
#pragma optimize("", off)
#define _FREECOMPILER_OPTIMIZE_OFF
#elif defined(AURORA_COMPILER_CLANG)
#define _FREECOMPILER_OPTIMIZE_OFF __attribute__((optnone))
#else
#define _FREECOMPILER_OPTIMIZE_OFF __attribute__((optimize("0")))
#endif
// TODO: bring the xenus thing into here
static AU_NOINLINE AuUInt GetIPNoBackend() _FREECOMPILER_OPTIMIZE_OFF
{
return _DBG_RET_ADDR;
}
#if defined(AURORA_COMPILER_MSVC)
#pragma optimize("", on)
#endif
#undef _FREECOMPILER_OPTIMIZE_OFF
static AU_INLINE void ErrorMakeNested()
{
_PushError(GetIPNoBackend(), EFailureCategory::kFailureNested, nullptr);
}
template<typename ... T>
AU_INLINE void ErrorMakeNested(const AuString &msg, T&& ... args)
{
if constexpr (sizeof...(T) == 0)
{
_PushError(GetIPNoBackend(), EFailureCategory::kFailureNested, msg.c_str());
}
else
{
#if defined(_AUHAS_FMT)
AUROXTL_COMMODITY_TRY
{
auto tempString = fmt::format(msg, AuForward<T>(args)...);
_PushError(GetIPNoBackend(), EFailureCategory::kFailureNested, tempString.c_str());
}
AUROXTL_COMMODITY_CATCH
{
_PushError(GetIPNoBackend(), EFailureCategory::kFailureNested, msg.c_str());
}
#else
_PushError(GetIPNoBackend(), EFailureCategory::kFailureNested, msg.c_str());
#endif
}
}
static AU_INLINE void ErrorMakeNested(const char *msg)
{
_PushError(GetIPNoBackend(), EFailureCategory::kFailureNested, msg);
}
template<typename ... T>
AU_INLINE void SysPushError(EFailureCategory category, const AuString &msg, T&& ... args)
{
if constexpr (sizeof...(T) == 0)
{
_PushError(GetIPNoBackend(), category, msg.c_str());
}
else
{
#if defined(_AUHAS_FMT)
AUROXTL_COMMODITY_TRY
{
auto tempString = fmt::format(msg, AuForward<T>(args)...);
_PushError(GetIPNoBackend(), category, tempString.c_str());
}
AUROXTL_COMMODITY_CATCH
{
_PushError(GetIPNoBackend(), category, msg.c_str());
}
#else
_PushError(GetIPNoBackend(), category, msg.c_str());
#endif
}
}
template<typename ... T>
AU_INLINE void SysPushError(EFailureCategory category, AuUInt16 uLineHint, const AuString &msg, T&& ... args)
{
if constexpr (sizeof...(T) == 0)
{
_PushError(GetIPNoBackend(), category, msg.c_str());
}
else
{
Aurora::Debug::AddMemoryCrunch();
#if defined(_AUHAS_FMT)
AUROXTL_COMMODITY_TRY
{
auto tempString = fmt::format(msg, AuForward<T>(args)...);
_PushError(GetIPNoBackend(), category, tempString.c_str(), uLineHint);
}
AUROXTL_COMMODITY_CATCH
{
_PushError(GetIPNoBackend(), category, msg.c_str(), uLineHint);
}
#else
_PushError(GetIPNoBackend(), category, msg.c_str(), uLineHint);
#endif
Aurora::Debug::DecMemoryCrunch();
}
}
static AU_INLINE void SysPushError(EFailureCategory category, const char *msg, AuUInt16 uLineHint = 0)
{
_PushError(GetIPNoBackend(), category, msg, uLineHint);
}
static AU_INLINE void SysPushError(EFailureCategory category, AuUInt16 uLineHint = 0)
{
_PushError(GetIPNoBackend(), category, "", uLineHint);
}
}
#if defined(AU_CFG_ID_INTERNAL) || defined(AU_CFG_ID_DEBUG)
#define SysSafeLine __LINE__
#else
#define SysSafeLine AuUInt16(0u)
#endif
#if defined(AURORA_COMPILER_MSVC)
#define SysSafeFunction __FUNCSIG__
#else
#define SysSafeFunction __PRETTY_FUNCTION__
#endif
#define SysCheckReturn(x, ...) if (!(static_cast<bool>(x))) { Aurora::Debug::ErrorMakeNested(); return __VA_ARGS__; }
#define SysPushErrorError(error, ...) do { Aurora::Debug::AddMemoryCrunch(); Aurora::Debug::SysPushError(Aurora::Debug::error, SysSafeLine, ## __VA_ARGS__) ;Aurora::Debug::DecMemoryCrunch(); } while (0)
#define SysPushUserError(exp, ...) do { Aurora::Debug::AddMemoryCrunch(); Aurora::Debug::SysPushError((Aurora::Debug::EFailureCategory)exp, SysSafeLine, ## __VA_ARGS__) ;Aurora::Debug::DecMemoryCrunch(); } while (0)
// legacy+shorthands
#define SysPushErrorArg(...) SysPushErrorError(kFailureParam, ## __VA_ARGS__)
#define SysPushErrorGen(...) SysPushErrorError(kFailureGeneric, ## __VA_ARGS__)
#define SysPushErrorCrypt(...) SysPushErrorError(kFailureCrypto, ## __VA_ARGS__)
#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__; }
#define SysCheckNotNull(x, ...) if (!(static_cast<bool>(x))) { SysPushErrorGeneric(#x " must not be null"); return __VA_ARGS__; }
#define SysCheckNotNullMemory(x, ...) if (!(static_cast<bool>(x))) { SysPushErrorMemory(#x " must not be null"); return __VA_ARGS__; }
#else
#define SysCheckArgNotNull(x, ...) if (!(static_cast<bool>(x))) { SysPushErrorArg(); return __VA_ARGS__; }
#define SysCheckNotNull(x, ...) if (!(static_cast<bool>(x))) { SysPushErrorGeneric(); return __VA_ARGS__; }
#define SysCheckNotNullMemory(x, ...) if (!(static_cast<bool>(x))) { SysPushErrorMemory(); return __VA_ARGS__; }
#endif
#if defined(AU_CFG_ID_INTERNAL) || defined(AU_CFG_ID_DEBUG) || defined(AU_INC_ARG_NAMES)
#define SysCheckRetExpNotNull(x, ...) if (auto n = x) { return n; } else { SysPushErrorGeneric(#x " must not be null [return]"); return __VA_ARGS__; }
#define SysCheckRetExpNotNullMemory(x, ...) if (auto n = x) { return n; } else { SysPushErrorMemory(#x); return __VA_ARGS__; }
#else
#define SysCheckRetExpNotNull(x, ...) if (auto n = x) { return n; } else { SysPushErrorGeneric(); return __VA_ARGS__; }
#define SysCheckRetExpNotNullMemory(x, ...) if (auto n = x) { return n; } else { SysPushErrorMemory(); return __VA_ARGS__; }
#endif
// edge case
#define SysPushErrorNested(...) Aurora::Debug::ErrorMakeNested(__VA_ARGS__);
// enums
#define SysPushErrorGeneric(...) SysPushErrorError(kFailureGeneric, ## __VA_ARGS__)
#define SysPushErrorCatch(...) SysPushErrorError(kFailureCatch, ## __VA_ARGS__)
#define SysPushErrorMemory(...) SysPushErrorError(kFailureMemory, ## __VA_ARGS__)
#define SysPushErrorIO(...) SysPushErrorError(kFailureIO, ## __VA_ARGS__)
#define SysPushErrorFIO(...) SysPushErrorError(kFailureFIO, ## __VA_ARGS__)
#define SysPushErrorNet(...) SysPushErrorError(kFailureNet, ## __VA_ARGS__)
#define SysPushErrorAudio(...) SysPushErrorError(kFailureAudio, ## __VA_ARGS__)
#define SysPushErrorHAL(...) SysPushErrorError(kFailureHAL, ## __VA_ARGS__)
#define SysPushErrorHALContext(...) SysPushErrorError(kFailureHALContext, ## __VA_ARGS__)
#define SysPushErrorCrypto(...) SysPushErrorError(kFailureCrypto, ## __VA_ARGS__)
#define SysPushErrorParam(...) SysPushErrorError(kFailureParam, ## __VA_ARGS__)
#define SysPushErrorLogicError(...) SysPushErrorError(kFailureLogicError, ## __VA_ARGS__)
#define SysPushErrorMathError(...) SysPushErrorError(kFailureMathError, ## __VA_ARGS__)
#define SysPushErrorUnavailableError(...) SysPushErrorError(kFailureUnavailableError, ## __VA_ARGS__)
#define SysPushErrorTimeoutError(...) SysPushErrorError(kFailureTimeoutError, ## __VA_ARGS__)
#define SysPushErrorWatchdogError(...) SysPushErrorError(kFailureWatchdogError, ## __VA_ARGS__)
#define SysPushErrorServiceError(...) SysPushErrorError(kFailureServiceError, ## __VA_ARGS__)
#define SysPushErrorPermissionError(...) SysPushErrorError(kFailurePermissionError, ## __VA_ARGS__)
#define SysPushErrorOutOfRange(...) SysPushErrorError(kFailureOutOfRange, ## __VA_ARGS__)
#define SysPushErrorSyntaxError(...) SysPushErrorError(kFailureSyntaxError, ## __VA_ARGS__)
#define SysPushErrorDisconnected(...) SysPushErrorError(kFailureDisconnected, ## __VA_ARGS__)
#define SysPushErrorUninitialized(...) SysPushErrorError(kFailureUninitialized, ## __VA_ARGS__)
#define SysPushErrorUnimplemented(...) SysPushErrorError(kFailureUnimplemented, ## __VA_ARGS__)
#define SysPushErrorSubmission(...) SysPushErrorError(kFailureSubmission, ## __VA_ARGS__)
#define SysPushErrorLockError(...) SysPushErrorError(kFailureLockError, ## __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__)
#define SysPushErrorMalformedData(...) SysPushErrorError(kFailureMalformedData, ## __VA_ARGS__)
#define SysPushErrorInSandboxContext(...) SysPushErrorError(kFailureInSandboxContext, ## __VA_ARGS__)
#define SysPushErrorParseError(...) SysPushErrorError(kFailureParseError, ## __VA_ARGS__)
#define SysPushErrorResourceExists(...) SysPushErrorError(kFailureResourceExists, ## __VA_ARGS__)
#define SysPushErrorResourceInvalid(...) SysPushErrorError(kFailureResourceInvalid, ## __VA_ARGS__)
#define SysPushErrorFeatureMissing(...) SysPushErrorError(kFailureFeatureMissing, ## __VA_ARGS__)
#define SysPushErrorFeatureOutOfDate(...) SysPushErrorError(kFailureFeatureOutOfDate, ## __VA_ARGS__)
#define SysPushErrorIOResourceFailure(...) SysPushErrorError(kFailureIOResourceFailure, ## __VA_ARGS__)
#define SysPushErrorIOResourceRejected(...) SysPushErrorError(kFailureIOResourceRejected, ## __VA_ARGS__)
#define SysPushErrorIOResourceOverflow(...) SysPushErrorError(kFailureIOResourceOverflow, ## __VA_ARGS__)
#define SysPushErrorIOResourceDisconnected(...) SysPushErrorError(kFailureIOResourceDisconnected, ## __VA_ARGS__)
#define SysPushErrorIOResourceNoData(...) SysPushErrorError(kFailureIOResourceNoData, ## __VA_ARGS__)
#define SysPushErrorIOResourceWouldBlock(...) SysPushErrorError(kFailureIOResourceWouldBlock, ## __VA_ARGS__)
#define SysPushErrorInvalidPath(...) SysPushErrorError(kFailureInvalidPath, ## __VA_ARGS__)
#define SysPushErrorInvalidHandle(...) SysPushErrorError(kFailureInvalidHandle, ## __VA_ARGS__)
#define SysPushErrorInvalidFd(...) SysPushErrorError(kFailureInvalidFd, ## __VA_ARGS__)
#define SysPushErrorInvalidContext(...) SysPushErrorError(kFailureInvalidContext, ## __VA_ARGS__)
#define SysPushErrorUnreachable(...) SysPushErrorError(kFailureUnreachable, ## __VA_ARGS__)
#define SysPushErrorOutOfBounds(...) SysPushErrorError(kFailureOutOfBounds, ## __VA_ARGS__)
#define SysPushErrorUnderflow(...) SysPushErrorError(kFailureUnderflow, ## __VA_ARGS__)
#define SysPushErrorOverflow(...) SysPushErrorError(kFailureOverflow, ## __VA_ARGS__)
#define SysPushErrorOutOfSpace(...) SysPushErrorError(kFailureOutOfSpace, ## __VA_ARGS__)
#define SysPushErrorOutOfSpaceDisk(...) SysPushErrorError(kFailureOutOfSpaceDisk, ## __VA_ARGS__)
#define SysPushErrorOutOfSpaceMemory(...) SysPushErrorError(kFailureOutOfSpaceMemory, ## __VA_ARGS__)
#define SysPushErrorWorkerUnavailable(...) SysPushErrorError(kFailureWorkerUnavailable, ## __VA_ARGS__)
#define SysPushErrorIOBlockReadError(...) SysPushErrorError(kFailureIOBlockReadError, ## __VA_ARGS__)
#define SysPushErrorIOWriteReadError(...) SysPushErrorError(kFailureIOWriteReadError, ## __VA_ARGS__)
#define SysPushErrorSystemError(...) SysPushErrorError(kFailureSystemError, ## __VA_ARGS__)
#define SysPushErrorSystemFileSystemError(...) SysPushErrorError(kFailureSystemFileSystemError, ## __VA_ARGS__)
#define SysPushErrorSystemBIOSError(...) SysPushErrorError(kFailureSystemBIOSError, ## __VA_ARGS__)
#define SysPushErrorSystemInputError(...) SysPushErrorError(kFailureSystemInputError, ## __VA_ARGS__)
#define SysPushErrorSystemDeviceError(...) SysPushErrorError(kFailureSystemDeviceError, ## __VA_ARGS__)
#define SysPushErrorSystemFirmwareError(...) SysPushErrorError(kFailureSystemFirmwareError, ## __VA_ARGS__)
#define SysPushErrorConcurrentRejected(...) SysPushErrorError(kFailureConcurrentRejected, ## __VA_ARGS__)
#define SysPushErrorConcurrentAborted(...) SysPushErrorError(kFailureConcurrentAborted, ## __VA_ARGS__)
#define SysPushErrorConcurrentWrongThread(...) SysPushErrorError(kFailureConcurrentWrongThread, ## __VA_ARGS__)
#define SysPushErrorConcurrentDeadlock(...) SysPushErrorError(kFailureConcurrentDeadlock, ## __VA_ARGS__)
#define SysPushErrorVersionMismatch(...) SysPushErrorError(kFailureVersionMismatch, ## __VA_ARGS__)
#define SysPushErrorHashMismatch(...) SysPushErrorError(kFailureHashMismatch, ## __VA_ARGS__)
#define SysPushErrorCryptographicVerificationFailure(...) SysPushErrorError(kFailureCryptographicVerificationFailure, ## __VA_ARGS__)
#define SysPushErrorInvalidArgPos1(...) SysPushErrorError(kFailureInvalidArgPos1, ## __VA_ARGS__)
#define SysPushErrorInvalidArgPos2(...) SysPushErrorError(kFailureInvalidArgPos2, ## __VA_ARGS__)
#define SysPushErrorInvalidArgPos3(...) SysPushErrorError(kFailureInvalidArgPos3, ## __VA_ARGS__)
#define SysPushErrorInvalidArgPos4(...) SysPushErrorError(kFailureInvalidArgPos4, ## __VA_ARGS__)
#define SysPushErrorInvalidArgPos5(...) SysPushErrorError(kFailureInvalidArgPos5, ## __VA_ARGS__)
#define SysPushErrorInvalidArgPos6(...) SysPushErrorError(kFailureInvalidArgPos6, ## __VA_ARGS__)
#define SysPushErrorInvalidArgPos7(...) SysPushErrorError(kFailureInvalidArgPos7, ## __VA_ARGS__)
#define SysPushErrorInvalidArgPos8(...) SysPushErrorError(kFailureInvalidArgPos8, ## __VA_ARGS__)
#define SysPushErrorInvalidArgPos9(...) SysPushErrorError(kFailureInvalidArgPos9, ## __VA_ARGS__)
#if defined(AU_CFG_ID_INTERNAL) || defined(AU_CFG_ID_DEBUG)
#define SysPushUserErrorDbg SysPushUserError
#define SysPushErrorArgDbg SysPushErrorArg
#define SysPushErrorGenDbg SysPushErrorGen
#define SysPushErrorCryptDbg SysPushErrorCrypt
#define SysPushErrorNetDbg SysPushErrorNet
#define SysPushErrorMemDbg SysPushErrorMem
#define SysPushErrorGenericDbg SysPushErrorGeneric
#define SysPushErrorNestedDbg SysPushErrorNested
#define SysPushErrorMemoryDbg SysPushErrorMemory
#define SysPushErrorIODbg SysPushErrorIO
#define SysPushErrorFIODbg SysPushErrorFIO
#define SysPushErrorNetDbg SysPushErrorNet
#define SysPushErrorAudioDbg SysPushErrorAudio
#define SysPushErrorHALDbg SysPushErrorHAL
#define SysPushErrorHALContextDbg SysPushErrorHALContext
#define SysPushErrorCryptoDbg SysPushErrorCrypto
#define SysPushErrorParamDbg SysPushErrorParam
#define SysPushErrorLogicErrorDbg SysPushErrorLogicError
#define SysPushErrorMathErrorDbg SysPushErrorMathError
#define SysPushErrorUnavailableErrorDbg SysPushErrorUnavailableError
#define SysPushErrorTimeoutErrorDbg SysPushErrorTimeoutError
#define SysPushErrorWatchdogErrorDbg SysPushErrorWatchdogError
#define SysPushErrorServiceErrorDbg SysPushErrorServiceError
#define SysPushErrorPermissionErrorDbg SysPushErrorPermissionError
#define SysPushErrorOutOfRangeDbg SysPushErrorOutOfRange
#define SysPushErrorSyntaxErrorDbg SysPushErrorSyntaxError
#define SysPushErrorDisconnectedDbg SysPushErrorDisconnected
#define SysPushErrorUninitializedDbg SysPushErrorUninitialized
#define SysPushErrorUnimplementedDbg SysPushErrorUnimplemented
#define SysPushErrorCatchDbg SysPushErrorCatch
#define SysPushErrorSubmissionDbg SysPushErrorSubmission
#define SysPushErrorLockErrorDbg SysPushErrorLockError
#define SysPushErrorSyntaxDbg SysPushErrorSyntax
#define SysPushErrorNoAccessDbg SysPushErrorNoAccess
#define SysPushErrorResourceMissingDbg SysPushErrorResourceMissing
#define SysPushErrorResourceLockedDbg SysPushErrorResourceLocked
#define SysPushErrorMalformedDataDbg SysPushErrorMalformedData
#define SysPushErrorInSandboxContextDbg SysPushErrorInSandboxContext
#define SysPushErrorParseErrorDbg SysPushErrorParseError
#define SysPushErrorResourceExistsDbg SysPushErrorResourceExists
#define SysPushErrorResourceInvalidDbg SysPushErrorResourceInvalid
#define SysPushErrorFeatureMissingDbg SysPushErrorFeatureMissing
#define SysPushErrorFeatureOutOfDateDbg SysPushErrorFeatureOutOfDate
#define SysPushErrorIOResourceFailureDbg SysPushErrorIOResourceFailure
#define SysPushErrorIOResourceRejectedDbg SysPushErrorIOResourceRejected
#define SysPushErrorIOResourceOverflowDbg SysPushErrorIOResourceOverflow
#define SysPushErrorIOResourceDisconnectedDbg SysPushErrorIOResourceDisconnected
#define SysPushErrorIOResourceNoDataDbg SysPushErrorIOResourceNoData
#define SysPushErrorIOResourceWouldBlockDbg SysPushErrorIOResourceWouldBlock
#define SysPushErrorInvalidPathDbg SysPushErrorInvalidPath
#define SysPushErrorInvalidHandleDbg SysPushErrorInvalidHandle
#define SysPushErrorInvalidFdDbg SysPushErrorInvalidFd
#define SysPushErrorInvalidContextDbg SysPushErrorInvalidContext
#define SysPushErrorUnreachableDbg SysPushErrorUnreachable
#define SysPushErrorOutOfBoundsDbg SysPushErrorOutOfBounds
#define SysPushErrorUnderflowDbg SysPushErrorUnderflow
#define SysPushErrorOverflowDbg SysPushErrorOverflow
#define SysPushErrorOutOfSpaceDbg SysPushErrorOutOfSpace
#define SysPushErrorOutOfSpaceDiskDbg SysPushErrorOutOfSpaceDisk
#define SysPushErrorOutOfSpaceMemoryDbg SysPushErrorOutOfSpaceMemory
#define SysPushErrorWorkerUnavailableDbg SysPushErrorWorkerUnavailable
#define SysPushErrorIOBlockReadErrorDbg SysPushErrorIOBlockReadError
#define SysPushErrorIOWriteReadErrorDbg SysPushErrorIOWriteReadError
#define SysPushErrorSystemErrorDbg SysPushErrorSystemError
#define SysPushErrorSystemFileSystemErrorDbg SysPushErrorSystemFileSystemError
#define SysPushErrorSystemBIOSErrorDbg SysPushErrorSystemBIOSError
#define SysPushErrorSystemInputErrorDbg SysPushErrorSystemInputError
#define SysPushErrorSystemDeviceErrorDbg SysPushErrorSystemDeviceError
#define SysPushErrorSystemFirmwareErrorDbg SysPushErrorSystemFirmwareError
#define SysPushErrorConcurrentRejectedDbg SysPushErrorConcurrentRejected
#define SysPushErrorConcurrentAbortedDbg SysPushErrorConcurrentAborted
#define SysPushErrorConcurrentWrongThreadDbg SysPushErrorConcurrentWrongThread
#define SysPushErrorConcurrentDeadlockDbg SysPushErrorConcurrentDeadlock
#define SysPushErrorVersionMismatchDbg SysPushErrorVersionMismatch
#define SysPushErrorHashMismatchDbg SysPushErrorHashMismatch
#define SysPushErrorCryptographicVerificationFailureDbg SysPushErrorCryptographicVerificationFailure
#define SysPushErrorInvalidArgPos1Dbg SysPushErrorInvalidArgPos1
#define SysPushErrorInvalidArgPos2Dbg SysPushErrorInvalidArgPos2
#define SysPushErrorInvalidArgPos3Dbg SysPushErrorInvalidArgPos3
#define SysPushErrorInvalidArgPos4Dbg SysPushErrorInvalidArgPos4
#define SysPushErrorInvalidArgPos5Dbg SysPushErrorInvalidArgPos5
#define SysPushErrorInvalidArgPos6Dbg SysPushErrorInvalidArgPos6
#define SysPushErrorInvalidArgPos7Dbg SysPushErrorInvalidArgPos7
#define SysPushErrorInvalidArgPos8Dbg SysPushErrorInvalidArgPos8
#define SysPushErrorInvalidArgPos9Dbg SysPushErrorInvalidArgPos9
#else
#define SysPushUserErrorDbg(...)
#define SysPushErrorArgDbg(...)
#define SysPushErrorGenDbg(...)
#define SysPushErrorCryptDbg(...)
#define SysPushErrorNetDbg(...)
#define SysPushErrorMemDbg(...)
#define SysPushErrorGenericDbg(...)
#define SysPushErrorNestedDbg(...)
#define SysPushErrorMemoryDbg(...)
#define SysPushErrorIODbg(...)
#define SysPushErrorFIODbg(...)
#define SysPushErrorNetDbg(...)
#define SysPushErrorAudioDbg(...)
#define SysPushErrorHALDbg(...)
#define SysPushErrorHALContextDbg(...)
#define SysPushErrorCryptoDbg(...)
#define SysPushErrorParamDbg(...)
#define SysPushErrorLogicErrorDbg(...)
#define SysPushErrorMathErrorDbg(...)
#define SysPushErrorUnavailableErrorDbg(...)
#define SysPushErrorTimeoutErrorDbg(...)
#define SysPushErrorWatchdogErrorDbg(...)
#define SysPushErrorServiceErrorDbg(...)
#define SysPushErrorPermissionErrorDbg(...)
#define SysPushErrorOutOfRangeDbg(...)
#define SysPushErrorSyntaxErrorDbg(...)
#define SysPushErrorDisconnectedDbg(...)
#define SysPushErrorUninitializedDbg(...)
#define SysPushErrorUnimplementedDbg(...)
#define SysPushErrorCatchDbg(...)
#define SysPushErrorSubmissionDbg(...)
#define SysPushErrorLockErrorDbg(...)
#define SysPushErrorSyntaxDbg(...)
#define SysPushErrorNoAccessDbg(...)
#define SysPushErrorResourceMissingDbg(...)
#define SysPushErrorResourceLockedDbg(...)
#define SysPushErrorMalformedDataDbg(...)
#define SysPushErrorInSandboxContextDbg(...)
#define SysPushErrorParseErrorDbg(...)
#define SysPushErrorResourceExistsDbg(...)
#define SysPushErrorResourceInvalidDbg(...)
#define SysPushErrorFeatureMissingDbg(...)
#define SysPushErrorFeatureOutOfDateDbg(...)
#define SysPushErrorIOResourceFailureDbg(...)
#define SysPushErrorIOResourceRejectedDbg(...)
#define SysPushErrorIOResourceOverflowDbg(...)
#define SysPushErrorIOResourceDisconnectedDbg(...)
#define SysPushErrorIOResourceNoDataDbg(...)
#define SysPushErrorIOResourceWouldBlockDbg(...)
#define SysPushErrorInvalidPathDbg(...)
#define SysPushErrorInvalidHandleDbg(...)
#define SysPushErrorInvalidFdDbg(...)
#define SysPushErrorInvalidContextDbg(...)
#define SysPushErrorUnreachableDbg(...)
#define SysPushErrorOutOfBoundsDbg(...)
#define SysPushErrorUnderflowDbg(...)
#define SysPushErrorOverflowDbg(...)
#define SysPushErrorOutOfSpaceDbg(...)
#define SysPushErrorOutOfSpaceDiskDbg(...)
#define SysPushErrorOutOfSpaceMemoryDbg(...)
#define SysPushErrorWorkerUnavailableDbg(...)
#define SysPushErrorIOBlockReadErrorDbg(...)
#define SysPushErrorIOWriteReadErrorDbg(...)
#define SysPushErrorSystemErrorDbg(...)
#define SysPushErrorSystemFileSystemErrorDbg(...)
#define SysPushErrorSystemBIOSErrorDbg(...)
#define SysPushErrorSystemInputErrorDbg(...)
#define SysPushErrorSystemDeviceErrorDbg(...)
#define SysPushErrorSystemFirmwareErrorDbg(...)
#define SysPushErrorConcurrentRejectedDbg(...)
#define SysPushErrorConcurrentAbortedDbg(...)
#define SysPushErrorConcurrentWrongThreadDbg(...)
#define SysPushErrorConcurrentDeadlockDbg(...)
#define SysPushErrorVersionMismatchDbg(...)
#define SysPushErrorHashMismatchDbg(...)
#define SysPushErrorCryptographicVerificationFailDbg(...)
#define SysPushErrorInvalidArgPos1Dbg(...)
#define SysPushErrorInvalidArgPos2Dbg(...)
#define SysPushErrorInvalidArgPos3Dbg(...)
#define SysPushErrorInvalidArgPos4Dbg(...)
#define SysPushErrorInvalidArgPos5Dbg(...)
#define SysPushErrorInvalidArgPos6Dbg(...)
#define SysPushErrorInvalidArgPos7Dbg(...)
#define SysPushErrorInvalidArgPos8Dbg(...)
#define SysPushErrorInvalidArgPos9Dbg(...)
#endif