|
NEP 4.3.0
NetCDF Expansion Pack
|
Error-handling macros for the nxCDF backend. More...
Go to the source code of this file.
Macros | |
| #define | EBAIL(e) |
| Log a NetCDF error, set ret, and jump to the fail: cleanup label. | |
| #define | EBAIL2(e) |
| Log a NetCDF error, dump the HDF5 error stack, set ret, and jump to the fail: cleanup label. | |
Error-handling macros for the nxCDF backend.
These macros mirror the NetCDF-C BAIL/BAIL2 pattern used in libsrc4 and libhdf5, adapted to the local cleanup style (ret and fail:) used by the nxCDF source files. See nxCDF Architecture for the convention in context.
| #define EBAIL | ( | e | ) |
Log a NetCDF error, set ret, and jump to the fail: cleanup label.
Use this for errors that are not HDF5-specific (for example, invalid arguments or missing state). Every function using it must declare int ret = NC_NOERR; and provide a fail: label.
| #define EBAIL2 | ( | e | ) |
Log a NetCDF error, dump the HDF5 error stack, set ret, and jump to the fail: cleanup label.
Use this after an HDF5 API call fails — HDF5 records its own detailed error stack, which H5Eprint2 dumps to stderr. Without logging compiled in (NEP_ENABLE_LOGGING=OFF) it degrades to EBAIL().