[cig-commits] r13717 - cs/cigma/trunk/src

luis at geodynamics.org luis at geodynamics.org
Wed Dec 17 02:31:58 PST 2008


Author: luis
Date: 2008-12-17 02:31:58 -0800 (Wed, 17 Dec 2008)
New Revision: 13717

Modified:
   cs/cigma/trunk/src/io_hdf5.h
Log:
Use h5_open_attribute instead of obj->openAttribute

Modified: cs/cigma/trunk/src/io_hdf5.h
===================================================================
--- cs/cigma/trunk/src/io_hdf5.h	2008-12-17 10:31:57 UTC (rev 13716)
+++ cs/cigma/trunk/src/io_hdf5.h	2008-12-17 10:31:58 UTC (rev 13717)
@@ -211,15 +211,21 @@
             return -2;
         }
 
-        attr = new H5::Attribute(obj->openAttribute(attr_name));
+        attr = h5_open_attribute(obj, attr_name);
 
+        if (attr == 0)
+        {
+            return -3;
+        }
+
         attr->read(h5_datatype_from<T>(), &val);
     }
     catch (H5::Exception error)
     {
         if (obj) { delete obj; }
         if (attr) { delete attr; }
-        return -1;
+        //error.printError();
+        return -4;
     }
 
     if (attr) { delete attr; }



More information about the CIG-COMMITS mailing list