diff options
author | Raymond Lu <songyulu@hdfgroup.org> | 2006-03-17 20:14:14 (GMT) |
---|---|---|
committer | Raymond Lu <songyulu@hdfgroup.org> | 2006-03-17 20:14:14 (GMT) |
commit | b6e8651a3a98e2af1f8deb70dd73c1265065a588 (patch) | |
tree | 7b3cedcc29fbb1efbcc453f025a031193a3f89c9 | |
parent | 3597bbd700866e5673262cf1a9c7bb2b13da5286 (diff) | |
download | hdf5-b6e8651a3a98e2af1f8deb70dd73c1265065a588.zip hdf5-b6e8651a3a98e2af1f8deb70dd73c1265065a588.tar.gz hdf5-b6e8651a3a98e2af1f8deb70dd73c1265065a588.tar.bz2 |
[svn-r12115] Purpose: Change codes in a more appropriate way.
Description: Yesterday, H5E_NONE_MAJOR and H5E_NONE_MINOR were added to error
API by hand.
Solution: Today, correct the change by hand with the tool hdf5/bin/make_err.
The change by hand is only in src/H5err.txt.
Platforms tested: fuss - simple change.
Misc. update:
-rw-r--r-- | src/H5Edefin.h | 8 | ||||
-rw-r--r-- | src/H5Einit.h | 24 | ||||
-rw-r--r-- | src/H5Epubgen.h | 12 | ||||
-rw-r--r-- | src/H5Eterm.h | 12 | ||||
-rw-r--r-- | src/H5err.txt | 5 |
5 files changed, 33 insertions, 28 deletions
diff --git a/src/H5Edefin.h b/src/H5Edefin.h index 89ea64a..122f493 100644 --- a/src/H5Edefin.h +++ b/src/H5Edefin.h @@ -39,6 +39,7 @@ hid_t H5E_HEAP_g = FAIL; /* Heap */ hid_t H5E_OHDR_g = FAIL; /* Object header */ hid_t H5E_ATOM_g = FAIL; /* Object atom */ hid_t H5E_ATTR_g = FAIL; /* Attribute */ +hid_t H5E_NONE_MAJOR_g = FAIL; /* No error */ hid_t H5E_IO_g = FAIL; /* Low-level I/O */ hid_t H5E_SLIST_g = FAIL; /* Skip Lists */ hid_t H5E_EFL_g = FAIL; /* External file list */ @@ -47,7 +48,6 @@ hid_t H5E_ARGS_g = FAIL; /* Invalid arguments to routine */ hid_t H5E_ERROR_g = FAIL; /* Error API */ hid_t H5E_PLINE_g = FAIL; /* Data filters */ hid_t H5E_CACHE_g = FAIL; /* Object cache */ -hid_t H5E_NONE_MAJOR_g = FAIL; /* No error, only for backward compatibility */ /* Minor error IDs */ @@ -116,6 +116,9 @@ hid_t H5E_LINK_g = FAIL; /* Link count failure */ hid_t H5E_SLINK_g = FAIL; /* Symbolic link error */ hid_t H5E_PATH_g = FAIL; /* Problem with path to object */ +/* No error */ +hid_t H5E_NONE_MINOR_g = FAIL; /* No error */ + /* File accessability errors */ hid_t H5E_FILEEXISTS_g = FAIL; /* File already exists */ hid_t H5E_FILEOPEN_g = FAIL; /* File already open */ @@ -182,7 +185,4 @@ hid_t H5E_BADVALUE_g = FAIL; /* Bad value */ hid_t H5E_CANTCONVERT_g = FAIL; /* Can't convert datatypes */ hid_t H5E_BADSIZE_g = FAIL; /* Bad size for object */ -/* No error, for backward compatibility */ -hid_t H5E_NONE_MINOR_g = FAIL; - #endif /* H5Edefin_H */ diff --git a/src/H5Einit.h b/src/H5Einit.h index 0b7610f..0fc0204 100644 --- a/src/H5Einit.h +++ b/src/H5Einit.h @@ -118,6 +118,11 @@ if((msg = H5E_create_msg(cls, H5E_MAJOR, "Attribute"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") if((H5E_ATTR_g = H5I_register(H5I_ERROR_MSG, msg))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +assert(H5E_NONE_MAJOR_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "No error"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_NONE_MAJOR_g = H5I_register(H5I_ERROR_MSG, msg))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") assert(H5E_IO_g==(-1)); if((msg = H5E_create_msg(cls, H5E_MAJOR, "Low-level I/O"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") @@ -158,11 +163,6 @@ if((msg = H5E_create_msg(cls, H5E_MAJOR, "Object cache"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") if((H5E_CACHE_g = H5I_register(H5I_ERROR_MSG, msg))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -assert(H5E_NONE_MAJOR_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "No error"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_NONE_MAJOR_g = H5I_register(H5I_ERROR_MSG, msg))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") /*********************/ /* Minor error codes */ @@ -414,6 +414,13 @@ if((msg = H5E_create_msg(cls, H5E_MINOR, "Problem with path to object"))==NULL) if((H5E_PATH_g = H5I_register(H5I_ERROR_MSG, msg))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +/* No error */ +assert(H5E_NONE_MINOR_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "No error"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_NONE_MINOR_g = H5I_register(H5I_ERROR_MSG, msg))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") + /* File accessability errors */ assert(H5E_FILEEXISTS_g==(-1)); if((msg = H5E_create_msg(cls, H5E_MINOR, "File already exists"))==NULL) @@ -680,11 +687,4 @@ if((msg = H5E_create_msg(cls, H5E_MINOR, "Bad size for object"))==NULL) if((H5E_BADSIZE_g = H5I_register(H5I_ERROR_MSG, msg))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -/* No error, only for backward compatibility */ -assert(H5E_NONE_MINOR_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "No error"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_NONE_MINOR_g = H5I_register(H5I_ERROR_MSG, msg))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") - #endif /* H5Einit_H */ diff --git a/src/H5Epubgen.h b/src/H5Epubgen.h index 3cfdb04..f8ee84c 100644 --- a/src/H5Epubgen.h +++ b/src/H5Epubgen.h @@ -42,6 +42,7 @@ #define H5E_OHDR (H5OPEN H5E_OHDR_g) #define H5E_ATOM (H5OPEN H5E_ATOM_g) #define H5E_ATTR (H5OPEN H5E_ATTR_g) +#define H5E_NONE_MAJOR (H5OPEN H5E_NONE_MAJOR_g) #define H5E_IO (H5OPEN H5E_IO_g) #define H5E_SLIST (H5OPEN H5E_SLIST_g) #define H5E_EFL (H5OPEN H5E_EFL_g) @@ -50,7 +51,6 @@ #define H5E_ERROR (H5OPEN H5E_ERROR_g) #define H5E_PLINE (H5OPEN H5E_PLINE_g) #define H5E_CACHE (H5OPEN H5E_CACHE_g) -#define H5E_NONE_MAJOR (H5OPEN H5E_NONE_MAJOR_g) H5_DLLVAR hid_t H5E_DATASET_g; /* Dataset */ H5_DLLVAR hid_t H5E_FUNC_g; /* Function entry/exit */ H5_DLLVAR hid_t H5E_STORAGE_g; /* Data storage */ @@ -70,6 +70,7 @@ H5_DLLVAR hid_t H5E_HEAP_g; /* Heap */ H5_DLLVAR hid_t H5E_OHDR_g; /* Object header */ H5_DLLVAR hid_t H5E_ATOM_g; /* Object atom */ H5_DLLVAR hid_t H5E_ATTR_g; /* Attribute */ +H5_DLLVAR hid_t H5E_NONE_MAJOR_g; /* No error */ H5_DLLVAR hid_t H5E_IO_g; /* Low-level I/O */ H5_DLLVAR hid_t H5E_SLIST_g; /* Skip Lists */ H5_DLLVAR hid_t H5E_EFL_g; /* External file list */ @@ -78,7 +79,6 @@ H5_DLLVAR hid_t H5E_ARGS_g; /* Invalid arguments to routine */ H5_DLLVAR hid_t H5E_ERROR_g; /* Error API */ H5_DLLVAR hid_t H5E_PLINE_g; /* Data filters */ H5_DLLVAR hid_t H5E_CACHE_g; /* Object cache */ -H5_DLLVAR hid_t H5E_NONE_MAJOR_g; /* No error */ /*********************/ /* Minor error codes */ @@ -194,6 +194,10 @@ H5_DLLVAR hid_t H5E_LINK_g; /* Link count failure */ H5_DLLVAR hid_t H5E_SLINK_g; /* Symbolic link error */ H5_DLLVAR hid_t H5E_PATH_g; /* Problem with path to object */ +/* No error */ +#define H5E_NONE_MINOR (H5OPEN H5E_NONE_MINOR_g) +H5_DLLVAR hid_t H5E_NONE_MINOR_g; /* No error */ + /* File accessability errors */ #define H5E_FILEEXISTS (H5OPEN H5E_FILEEXISTS_g) #define H5E_FILEOPEN (H5OPEN H5E_FILEOPEN_g) @@ -310,8 +314,4 @@ H5_DLLVAR hid_t H5E_BADVALUE_g; /* Bad value */ H5_DLLVAR hid_t H5E_CANTCONVERT_g; /* Can't convert datatypes */ H5_DLLVAR hid_t H5E_BADSIZE_g; /* Bad size for object */ -/* No error, only for backward compatibility */ -#define H5E_NONE_MINOR (H5OPEN H5E_NONE_MINOR_g) -H5_DLLVAR hid_t H5E_NONE_MINOR_g; /* No error, only for backward compatibility */ - #endif /* H5Epubgen_H */ diff --git a/src/H5Eterm.h b/src/H5Eterm.h index cc70893..d04db96 100644 --- a/src/H5Eterm.h +++ b/src/H5Eterm.h @@ -40,6 +40,7 @@ H5E_HEAP_g= H5E_OHDR_g= H5E_ATOM_g= H5E_ATTR_g= +H5E_NONE_MAJOR_g= H5E_IO_g= H5E_SLIST_g= H5E_EFL_g= @@ -47,8 +48,7 @@ H5E_TST_g= H5E_ARGS_g= H5E_ERROR_g= H5E_PLINE_g= -H5E_CACHE_g= -H5E_NONE_MAJOR_g=(-1); +H5E_CACHE_g= (-1); /* Reset minor error IDs */ @@ -118,6 +118,9 @@ H5E_LINK_g= H5E_SLINK_g= H5E_PATH_g= +/* No error */ +H5E_NONE_MINOR_g= + /* File accessability errors */ H5E_FILEEXISTS_g= H5E_FILEOPEN_g= @@ -182,9 +185,6 @@ H5E_BADVALUE_g= /* Datatype conversion errors */ H5E_CANTCONVERT_g= -H5E_BADSIZE_g= - -/* No error, only for backward compatibility */ -H5E_NONE_MINOR_g= (-1); +H5E_BADSIZE_g= (-1); #endif /* H5Eterm_H */ diff --git a/src/H5err.txt b/src/H5err.txt index 91866d4..d55ad9e 100644 --- a/src/H5err.txt +++ b/src/H5err.txt @@ -71,6 +71,7 @@ MAJOR, H5E_TST, Ternary Search Trees MAJOR, H5E_RS, Reference Counted Strings MAJOR, H5E_ERROR, Error API MAJOR, H5E_SLIST, Skip Lists +MAJOR, H5E_NONE_MAJOR, No error # Sections (for grouping minor errors) SECTION, ARGS, Argument errors @@ -91,6 +92,7 @@ SECTION, HEAP, Heap errors SECTION, FPH5, FPHDF5 errors SECTION, PIPELINE, I/O pipeline errors SECTION, SYSTEM, System level errors +SECTION, NONE, No error # Minor errors @@ -224,3 +226,6 @@ MINOR, PIPELINE, H5E_NOENCODER, Filter present but encoding disabled # System level errors MINOR, SYSTEM, H5E_SYSERRSTR, System error message + +# No error, for backward compatibility */ +MINOR, NONE, H5E_NONE_MINOR, No error |