enforceValidId

fnhid_t enforceValidId(hid_t id, lazy string msg, string funcName = "")

Enforces that an HDF5 ID is valid, throwing an exception on failure.

Parameters

idThe HDF5 identifier to check
msgError message to include in the exception
funcNameName of the HDF5 function (optional)

Returns

The validated ID

Throws

HDF5Exception if the ID is invalid