summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2011-06-03 15:58:49 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2011-06-03 15:58:49 (GMT)
commit4bffd76b3ccc6cecf1691f6e350d7e58408fc69e (patch)
tree6ec89e9fc6b98772fa1014a37ffc753fa6934ebd /src
parentb71a597e86c431c0c72c30e40db6baa9d7046cf5 (diff)
downloadhdf5-4bffd76b3ccc6cecf1691f6e350d7e58408fc69e.zip
hdf5-4bffd76b3ccc6cecf1691f6e350d7e58408fc69e.tar.gz
hdf5-4bffd76b3ccc6cecf1691f6e350d7e58408fc69e.tar.bz2
[svn-r20929] Issue 4278 - When reading data fails, the error message should say which filter isn't registered. The fix is simple. Most of the effort is on the test. The file with filter enabled is created in gen_filter.c. The verification of the error message is in test_error.c. The output is compared against the standard output.
Tested on jam, koala, and heiwa.
Diffstat (limited to 'src')
-rw-r--r--src/H5Z.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/H5Z.c b/src/H5Z.c
index b22863e..c083641 100644
--- a/src/H5Z.c
+++ b/src/H5Z.c
@@ -96,9 +96,6 @@ H5Z_init_interface (void)
HGOTO_ERROR (H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register fletcher32 filter")
#endif /* H5_HAVE_FILTER_FLETCHER32 */
#ifdef H5_HAVE_FILTER_SZIP
- H5Z_SZIP->encoder_present = SZ_encoder_enabled();
- if (H5Z_SZIP->encoder_present < 0)
- HGOTO_ERROR (H5E_PLINE, H5E_CANTINIT, FAIL, "szip filter reports bad status")
if (H5Z_register (H5Z_SZIP)<0)
HGOTO_ERROR (H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register szip filter")
#endif /* H5_HAVE_FILTER_SZIP */
@@ -1091,7 +1088,14 @@ H5Z_pipeline(const H5O_pline_t *pline, unsigned flags,
continue;/*filter excluded*/
}
if ((fclass_idx=H5Z_find_idx(pline->filter[idx].id))<0) {
- HGOTO_ERROR(H5E_PLINE, H5E_READERROR, FAIL, "required filter is not registered")
+ /* Print out the filter name to give more info. But the name is optional for
+ * the filter */
+ if(pline->filter[idx].name)
+ HGOTO_ERROR(H5E_PLINE, H5E_READERROR, FAIL, "required filter '%s' is not registered",
+ pline->filter[idx].name)
+ else
+ HGOTO_ERROR(H5E_PLINE, H5E_READERROR, FAIL, "required filter (name unavailable) is not registered")
+
}
fclass=&H5Z_table_g[fclass_idx];
#ifdef H5Z_DEBUG