Result Codes
Macros
- OMNI_FAILED: Returns - trueif the given omni::core::Result is a failure code.
- OMNI_RETURN_IF_FAILED: If the given omni::core::Result is a failure code, calls - return resultto exit the current function.
- OMNI_SUCCEEDED: Returns - trueif the given omni::core::Result is not a failure code.
Typedefs
- omni::core::Result: Error code for the result of an operation. 
Variables
- omni::core::kResultAccessDenied: Access has been denied for this operation. 
- omni::core::kResultAlreadyExists: Object already exists. 
- omni::core::kResultFail: The operation failed. 
- omni::core::kResultInsufficientBuffer: Insufficient buffer. 
- omni::core::kResultInterrupted: An operation was interrupted. An "interruption" happens in cases where the operation did not complete successfully due to an outside system (such as a timer) interrupting it. For example, a function - Result wait_for(duration d)might give- kResultSuccesswhen function returns because the duration expired and- kResultInterruptedif the system is shutting down.
- omni::core::kResultInvalidArgument: One or more of the arguments passed to a given function was invalid. 
- omni::core::kResultInvalidDataSize: Invalid data size. This arises when the correct type of data is requested, but the requester believes the data size is different from the receiver. The cause of this is typically a version mismatch. 
- omni::core::kResultInvalidDataType: Invalid data type. This is used in cases where a specific type of data is requested, but that is not the data which the receiver has. 
- omni::core::kResultInvalidIndex: Invalid index. 
- omni::core::kResultInvalidOperation: The operation was not valid for the target. For example, attempting to perform a write operation on a read-only file would result in this error. 
- omni::core::kResultInvalidState: The system is in an invalid state to perform the operation. This is distinct from - kResultInvalidOperationin that it covers situations like "system is not yet started" or "file is closed.".
- omni::core::kResultNoInterface: Interface not implemented. 
- omni::core::kResultNoMoreItems: No more items to return. This is meant for things like reader queues when they have run out of data and will never have more data. For cases where something like an async queue being temporarily empty, use - kResultTryAgain.
- omni::core::kResultNotEnoughData: Not enough data. 
- omni::core::kResultNotFound: The item was not found. 
- omni::core::kResultNotImplemented: The feature or method was not implemented. It might be at some point in the future. 
- omni::core::kResultNotSupported: The operation is not supported. 
- omni::core::kResultNullPointer: Pointer is null. 
- omni::core::kResultOperationAborted: The operation was aborted. 
- omni::core::kResultOutOfMemory: A system is out of memory. This does not necessarily mean resident memory has been exhausted (although it can), as this code can be used to special conditions such as exhausting graphics memory or running out of a specific memory pool. It can also indicate that an allocation would have been too big and failed ahead of time. 
- omni::core::kResultSuccess: Operation successful. No error occurred. 
- omni::core::kResultTooMuchData: Too much data. 
- omni::core::kResultTryAgain: Try the operation again. This is typically emitted in situations where an operation would require blocking, but the system is configured to be non-blocking. For example, attempting to read from a TCP socket when no data has been received would return - kResultTryAgain.
- omni::core::kResultVersionCheckFailure: Version check failure. 
- omni::core::kResultVersionParseError: Failed to parse the version. 
Typedefs
- 
using omni::core::Result = std::int32_t
- Error code for the result of an operation. - The numeric encoding for values follows Microsoft’s HRESULT scheme. Many values are direct copies of those from the Windows API, such as - kResultNotImplemented. Codes which are NVIDIA-provided, will have the mask- 0xa4310000. This comes from setting the “customer bit” (bit at most-significant index 2) and having a “facility” (bits from index 5-15) of- 0b10000110001aka- 0x431(which is- "NVDA"in Morse Code).
Variables
- 
constexpr Result omni::core::kResultAccessDenied = 0x80070005
- Access has been denied for this operation. - POSIX: - EACCES
- Windows: - E_ACCESSDENIED
- Decimal Value: -2147024891 
 
- 
constexpr Result omni::core::kResultAlreadyExists = 0x80030050
- Object already exists. - POSIX: - EEXISTor- EBUSY
- Decimal Value: -2147286960 
 
- 
constexpr Result omni::core::kResultFail = 0x80004005
- The operation failed. - Decimal Value: -2147467259 
 
- 
constexpr Result omni::core::kResultInsufficientBuffer = 0x8007007A
- Insufficient buffer. - Decimal Value: -2147024774 
 
- 
constexpr Result omni::core::kResultInterrupted = 0xa4310001
- An operation was interrupted. An “interruption” happens in cases where the operation did not complete successfully due to an outside system (such as a timer) interrupting it. For example, a function - Result wait_for(duration d)might give- kResultSuccesswhen function returns because the duration expired and- kResultInterruptedif the system is shutting down.- POSIX: - EINTR
- Windows: - WSAEINTR
- Decimal Value: -1540292607 
 
- 
constexpr Result omni::core::kResultInvalidArgument = 0x80070057
- One or more of the arguments passed to a given function was invalid. - POSIX: - EINVAL
- Windows: - E_INVALIDARG
- Decimal Value: -2147024809 
 
- 
constexpr Result omni::core::kResultInvalidDataSize = 0x8031000C
- Invalid data size. This arises when the correct type of data is requested, but the requester believes the data size is different from the receiver. The cause of this is typically a version mismatch. - Decimal Value: -2144272372 
 
- 
constexpr Result omni::core::kResultInvalidDataType = 0x8031000B
- Invalid data type. This is used in cases where a specific type of data is requested, but that is not the data which the receiver has. - Decimal Value: -2144272373 
 
- 
constexpr Result omni::core::kResultInvalidIndex = 0x80091008
- Invalid index. - POSIX: covered by - EINVALor- ENOENT, depending on the situation
- Decimal Value: -2146889720 
 
- 
constexpr Result omni::core::kResultInvalidOperation = 0x800710DD
- The operation was not valid for the target. For example, attempting to perform a write operation on a read-only file would result in this error. - POSIX: - EPERM
- Decimal Value: -2147020579 
 
- 
constexpr Result omni::core::kResultInvalidState = 0x80070004
- The system is in an invalid state to perform the operation. This is distinct from - kResultInvalidOperationin that it covers situations like “system is not yet started” or “file is closed.”.- Decimal Value: -2147024892 
 
- 
constexpr Result omni::core::kResultNoInterface = 0x80004002
- Interface not implemented. - Decimal Value: -2147467262 
 
- 
constexpr Result omni::core::kResultNoMoreItems = 0x8009002A
- No more items to return. This is meant for things like reader queues when they have run out of data and will never have more data. For cases where something like an async queue being temporarily empty, use - kResultTryAgain.- Decimal Value: -2146893782 
 
- 
constexpr Result omni::core::kResultNotEnoughData = 0x80290101
- Not enough data. - Decimal Value: -2144796415 
 
- 
constexpr Result omni::core::kResultNotFound = 0x80070002
- The item was not found. - Decimal Value: -2147024894 
 
- 
constexpr Result omni::core::kResultNotImplemented = 0x80004001
- The feature or method was not implemented. It might be at some point in the future. - POSIX: - ENOSYS
- Windows: - E_NOTIMPL
- Decimal Value: -2147467263 
 
- 
constexpr Result omni::core::kResultNotSupported = 0x80070032
- The operation is not supported. - Decimal Value: -2147024846 
 
- 
constexpr Result omni::core::kResultNullPointer = 0x80004003
- Pointer is null. - POSIX: covered by - EINVAL
- Decimal Value: -2147467261 
 
- 
constexpr Result omni::core::kResultOperationAborted = 0x80004004
- The operation was aborted. - Windows: - E_ABORT
- Decimal Value: -2147467260 
 
- 
constexpr Result omni::core::kResultOutOfMemory = 0x8007000E
- A system is out of memory. This does not necessarily mean resident memory has been exhausted (although it can), as this code can be used to special conditions such as exhausting graphics memory or running out of a specific memory pool. It can also indicate that an allocation would have been too big and failed ahead of time. - POSIX: - ENOMEM
- Windows: - E_OUTOFMEMORY
- Decimal Value: -2147024882 
 
- 
constexpr Result omni::core::kResultTooMuchData = 0x80290102
- Too much data. - Decimal Value: -2144796414 
 
- 
constexpr Result omni::core::kResultTryAgain = 0x8007106B
- Try the operation again. This is typically emitted in situations where an operation would require blocking, but the system is configured to be non-blocking. For example, attempting to read from a TCP socket when no data has been received would return - kResultTryAgain.- POSIX: - EAGAIN,- EWOULDBLOCK
- Windows: - WMI_TRY_AGAIN
- Decimal Value: -2147020693 Try the operation again.