From 3ca52ffcc2fbd74447ce6e159e0df452389b812a Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Mon, 10 Jun 2002 12:51:32 -0500 Subject: [svn-r5573] Purpose: Bug fix (#620) Description: Change slightly misleading error message when creating attribute with same name as existing attribute to something a bit more clear. Platforms tested: FreeBSD 4.5 (sleipnir) --- src/H5A.c | 2 +- src/H5E.c | 1 + src/H5Epublic.h | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/H5A.c b/src/H5A.c index f95bb9b..1157e19 100644 --- a/src/H5A.c +++ b/src/H5A.c @@ -265,7 +265,7 @@ H5A_create(const H5G_entry_t *ent, const char *name, const H5T_t *type, */ if(HDstrcmp(found_attr.name,attr->name)==0) { H5O_reset (H5O_ATTR, &found_attr); - HGOTO_ERROR(H5E_ATTR, H5E_CANTCREATE, FAIL, + HGOTO_ERROR(H5E_ATTR, H5E_ALREADYEXISTS, FAIL, "attribute already exists"); } H5O_reset (H5O_ATTR, &found_attr); diff --git a/src/H5E.c b/src/H5E.c index 6348fb1..5fa67a9 100644 --- a/src/H5E.c +++ b/src/H5E.c @@ -76,6 +76,7 @@ static const H5E_minor_mesg_t H5E_minor_mesg_g[] = { {H5E_NOSPACE, "No space available for allocation"}, {H5E_CANTCOPY, "Unable to copy object"}, {H5E_CANTFREE, "Unable to free object"}, + {H5E_ALREADYEXISTS, "Object already exists"}, /* File accessability errors */ {H5E_FILEEXISTS, "File already exists"}, diff --git a/src/H5Epublic.h b/src/H5Epublic.h index bb62c1a..1b37f15 100644 --- a/src/H5Epublic.h +++ b/src/H5Epublic.h @@ -116,6 +116,7 @@ typedef enum H5E_minor_t { H5E_NOSPACE, /*no space available for allocation */ H5E_CANTCOPY, /*unable to copy object */ H5E_CANTFREE, /*unable to free object */ + H5E_ALREADYEXISTS, /*Object already exists */ /* File accessability errors */ H5E_FILEEXISTS, /*file already exists */ -- cgit v0.12