safeCall

fnherr_t safeCall(herr_t operation, lazy string errorMsg)

Safely executes an HDF5 operation and handles errors.

Parameters

operationThe operation to execute
errorMsgError message if operation fails

Returns

The result of the operation

Throws

HDF5Exception if the operation returns a negative value