Use the H5E_SET_AUTO call to toggle error printing on and off.