diff options
Diffstat (limited to 'c++/test/trefer.cpp')
-rw-r--r-- | c++/test/trefer.cpp | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/c++/test/trefer.cpp b/c++/test/trefer.cpp index 0331c8d..d7c237f 100644 --- a/c++/test/trefer.cpp +++ b/c++/test/trefer.cpp @@ -148,19 +148,19 @@ test_reference_params(void) /* Test parameters to H5Location::reference */ try { file1->reference(NULL, "/Group1/Dataset1"); - } catch (ReferenceException E) {} // We expect this to fail + } catch (ReferenceException& E) {} // We expect this to fail try { file1->reference(&wbuf[0], NULL); - } catch (ReferenceException E) {} // We expect this to fail + } catch (ReferenceException& E) {} // We expect this to fail try { file1->reference(&wbuf[0], ""); - } catch (ReferenceException E) {} // We expect this to fail + } catch (ReferenceException& E) {} // We expect this to fail try { file1->reference(&wbuf[0], "/Group1/Dataset1", H5R_MAXTYPE); - } catch (ReferenceException E) {} // We expect this to fail + } catch (ReferenceException& E) {} // We expect this to fail try { file1->reference(&wbuf[0], "/Group1/Dataset1", H5R_DATASET_REGION); - } catch (ReferenceException E) {} // We expect this to fail + } catch (ReferenceException& E) {} // We expect this to fail // Close resources dataset.close(); @@ -174,7 +174,8 @@ test_reference_params(void) PASSED(); } // end try - catch (Exception E) { + catch (Exception& E) + { issue_fail_msg("test_reference_param()",__LINE__,__FILE__, E.getCFuncName(), E.getCDetailMsg()); } @@ -331,7 +332,7 @@ static void test_reference_obj(void) try { H5std_string read_comment_tmp = group.getComment(NULL); } - catch (Exception E) {} // We expect this to fail + catch (Exception& E) {} // We expect this to fail // Close group group.close(); @@ -362,7 +363,8 @@ static void test_reference_obj(void) PASSED(); } // end try - catch (Exception E) { + catch (Exception& E) + { issue_fail_msg("test_reference_obj()",__LINE__,__FILE__, E.getCFuncName(), E.getCDetailMsg()); } @@ -490,7 +492,8 @@ test_reference_group(void) PASSED(); } // end try - catch (Exception E) { + catch (Exception& E) + { issue_fail_msg("test_reference_group()",__LINE__,__FILE__, E.getCFuncName(), E.getCDetailMsg()); } @@ -778,7 +781,8 @@ test_reference_region_1D(void) PASSED(); } // end try - catch (Exception E) { + catch (Exception& E) + { issue_fail_msg("test_reference_region_1D()",__LINE__,__FILE__, E.getCFuncName(), E.getCDetailMsg()); } |