diff options
author | Robb Matzke <matzke@llnl.gov> | 1997-12-11 21:35:46 (GMT) |
---|---|---|
committer | Robb Matzke <matzke@llnl.gov> | 1997-12-11 21:35:46 (GMT) |
commit | faca6fbaa8c557b18d6b264841fc8717d1e73816 (patch) | |
tree | 2123e6290a24e6ad94c776e45283800cc6917f92 /src/H5Ffamily.c | |
parent | 3c16901751f40fcbbf36878fe13b0237a3753bc9 (diff) | |
download | hdf5-faca6fbaa8c557b18d6b264841fc8717d1e73816.zip hdf5-faca6fbaa8c557b18d6b264841fc8717d1e73816.tar.gz hdf5-faca6fbaa8c557b18d6b264841fc8717d1e73816.tar.bz2 |
[svn-r145] ./src/H5Osdtyp.c -> H5Odtype.c
./src/H5Osdim.c -> H5Osdspace.c
./src/Makefile.in
Changed the names of these files to better reflect what they
actually do.
./src/H5.c
./src/H5AC.c
./src/H5B.c
./src/H5C.c
./src/H5D.c
./src/H5E.c
./src/H5Eprivate.h
./src/H5Epublic.h
./src/H5F.c
./src/H5Fcore.c
./src/H5Ffamily.c
./src/H5Fistore.c
./src/H5Flow.c
./src/H5Fsec2.c
./src/H5Fsplit.c
./src/H5Fstdio.c
./src/H5G.c
./src/H5Gent.c
./src/H5Gnode.c
./src/H5Gshad.c
./src/H5Gstab.c
./src/H5H.c
./src/H5M.c
./src/H5MF.c
./src/H5O.c
./src/H5Osdtyp.c (./src/H5Odtype.c)
./src/H5P.c
./src/H5T.c
./src/H5detect.c
./src/H5private.h
Added an argument to the HRETURN_ERROR(), HGOTO_ERROR(), and
HERROR() macros which is a string error message. This allows
us to give extra information which can't be represented by the
major and minor error numbers. This information was
previously in comments just before or after the macro call.
The string isn't currently used, but I'm planning to change
the test files so they print an error trace when something
fails. This should make debugging a little faster since it's
often obvious what's wrong if we could just see the error
stack without even having to start a debugger.
Diffstat (limited to 'src/H5Ffamily.c')
-rw-r--r-- | src/H5Ffamily.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/H5Ffamily.c b/src/H5Ffamily.c index bf0431f..3c4c35b 100644 --- a/src/H5Ffamily.c +++ b/src/H5Ffamily.c @@ -110,7 +110,7 @@ H5F_fam_open (const char *name, uintn flags, H5F_search_t *key/*out*/) if (!H5F_low_access (H5F_LOW_DFLT, member_name, F_OK, NULL)) { break; } else if (unlink (member_name)<0) { - HGOTO_ERROR (H5E_IO, H5E_CANTINIT, NULL);/*can't delete member*/ + HGOTO_ERROR (H5E_IO, H5E_CANTINIT, NULL, "can't delete member"); } } } @@ -133,8 +133,8 @@ H5F_fam_open (const char *name, uintn flags, H5F_search_t *key/*out*/) 0==membno?key:NULL); if (!member) { if (0==membno) { - /* Can't open first family member */ - HGOTO_ERROR (H5E_IO, H5E_CANTOPENFILE, NULL); + HGOTO_ERROR (H5E_IO, H5E_CANTOPENFILE, NULL, + "can't open first family member"); } break; } @@ -294,8 +294,8 @@ H5F_fam_read (H5F_low_t *lf, const haddr_t *addr, size_t size, uint8 *buf) cur_addr.offset = offset; if (H5F_low_read (lf->u.fam.memb[membno], &cur_addr, nbytes, buf)<0) { - /* Can't read from family member */ - HRETURN_ERROR (H5E_IO, H5E_READERROR, FAIL); + HRETURN_ERROR (H5E_IO, H5E_READERROR, FAIL, + "can't read from family member"); } buf += nbytes; size -= nbytes; @@ -366,8 +366,8 @@ H5F_fam_write (H5F_low_t *lf, const haddr_t *addr, size_t size, lf->u.fam.flags|H5F_ACC_CREAT, NULL); if (!member) { - /* Can't create a new member */ - HRETURN_ERROR (H5E_IO, H5E_CANTOPENFILE, FAIL); + HRETURN_ERROR (H5E_IO, H5E_CANTOPENFILE, FAIL, + "can't create a new member"); } /* @@ -401,8 +401,8 @@ H5F_fam_write (H5F_low_t *lf, const haddr_t *addr, size_t size, /* Write the data to the member */ if (H5F_low_write (lf->u.fam.memb[membno], &cur_addr, nbytes, buf)<0) { - /* Can't write to family member */ - HRETURN_ERROR (H5E_IO, H5E_WRITEERROR, FAIL); + HRETURN_ERROR (H5E_IO, H5E_WRITEERROR, FAIL, + "can't write to family member"); } buf += nbytes; size -= nbytes; @@ -458,12 +458,12 @@ H5F_fam_flush (H5F_low_t *lf) H5F_addr_inc (&addr3, (size_t)1); H5F_low_seteof (lf->u.fam.memb[0], &addr3); /*prevent a warning*/ if (H5F_low_read (lf->u.fam.memb[0], &addr1, 1, buf)<0) { - /* Can't read from first family member */ - HRETURN_ERROR (H5E_IO, H5E_READERROR, FAIL); + HRETURN_ERROR (H5E_IO, H5E_READERROR, FAIL, + "can't read from first family member"); } if (H5F_low_write (lf->u.fam.memb[0], &addr1, 1, buf)<0) { - /* Can't write to first family member */ - HRETURN_ERROR (H5E_IO, H5E_WRITEERROR, FAIL); + HRETURN_ERROR (H5E_IO, H5E_WRITEERROR, FAIL, + "can't write to first family member"); } H5F_low_seteof (lf->u.fam.memb[0], &addr2); /*reset old eof*/ @@ -477,8 +477,8 @@ H5F_fam_flush (H5F_low_t *lf) } } if (nerrors) { - /* Can't flush family member */ - HRETURN_ERROR (H5E_IO, H5E_WRITEERROR, FAIL); + HRETURN_ERROR (H5E_IO, H5E_WRITEERROR, FAIL, + "can't flush family member"); } FUNC_LEAVE (SUCCEED); @@ -539,8 +539,8 @@ H5F_fam_access (const char *name, int mode, H5F_search_t *key/*out*/) } if (status<0) { - /* Access method failed for a member file */ - HRETURN_ERROR (H5E_IO, H5E_CANTOPENFILE, FAIL); + HRETURN_ERROR (H5E_IO, H5E_CANTOPENFILE, FAIL, + "access method failed for a member file"); } } |