From e0f621b0fa2094283f9a28155e5fbc75c74bd82c Mon Sep 17 00:00:00 2001 From: Thomas White Date: Sun, 24 Apr 2011 11:42:58 +0200 Subject: indexamajig: Complain more loudly about using nominal value, and convert it properly --- src/hdf5-file.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/hdf5-file.c') diff --git a/src/hdf5-file.c b/src/hdf5-file.c index 0ca4f4d8..b8a8bdc3 100644 --- a/src/hdf5-file.c +++ b/src/hdf5-file.c @@ -278,9 +278,11 @@ static double get_wavelength(struct hdfile *f) dh = H5Dopen2(f->fh, "/LCLS/photon_wavelength_nm", H5P_DEFAULT); if ( dh < 0 ) { dh = H5Dopen2(f->fh, "/LCLS/photon_wavelength_A", H5P_DEFAULT); - if ( dh < 0 ) return -1.0; + if ( dh < 0 ) { + ERROR("Couldn't get photon wavelength from HDF5 file.\n"); + return -1.0; + } nm = 0; - } r = H5Dread(dh, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, -- cgit v1.2.3