nverror.h contains our error code enumeration and helper macros.
Macros | |
#define | NV_CHECK_ERROR(expr) |
A helper macro to check a function's error return code and propagate any errors upward. More... | |
#define | NV_CHECK_ERROR_CLEANUP(expr) |
A helper macro to check a function's error return code and, if an error occurs, jump to a label where cleanup can take place. More... | |
Enumerations | |
enum | NvError { NvSuccess = NvError_Success, NvError_Force32 = 0x7FFFFFFF } |
The NvError enumeration contains ALL return / error codes. More... | |
#define NV_CHECK_ERROR | ( | expr | ) |
A helper macro to check a function's error return code and propagate any errors upward.
This assumes that no cleanup is necessary in the event of failure. This macro does not locally define its own NvError variable out of fear that this might burn too much stack space, particularly in debug builds or with mediocre optimizing compilers. The user of this macro is therefore expected to provide their own local variable "NvError e;".
#define NV_CHECK_ERROR_CLEANUP | ( | expr | ) |
A helper macro to check a function's error return code and, if an error occurs, jump to a label where cleanup can take place.
Like NV_CHECK_ERROR, this macro does not locally define its own NvError variable. (Even if we wanted it to, this one can't, because the code at the "fail" label probably needs to do a "return e;" to propagate the error upwards.)
enum NvError |