[svn-r1213] Added better error message for attemping to close a default property list.

This commit is contained in:
Quincey Koziol
1999-04-23 17:09:25 -05:00
parent 87f0d37a76
commit a648d47c90

View File

@@ -272,9 +272,10 @@ H5Pclose(hid_t plist_id)
H5TRACE1("e","i",plist_id);
/* Check arguments */
if ((type=H5P_get_class (plist_id))<0 ||
NULL==(plist=H5I_object (plist_id))) {
HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list");
if (plist_id==H5P_DEFAULT)
HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't close predefined object");
if ((type=H5P_get_class (plist_id))<0 || NULL==(plist=H5I_object (plist_id))) {
HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list");
}
/*