Skip to content

Commit

Permalink
Remove duplicated try-catch in filter test
Browse files Browse the repository at this point in the history
This was hiding printing the error message
  • Loading branch information
ZedThree committed Oct 19, 2023
1 parent 1b1e0e6 commit 88650e3
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions cxx4/test_filter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,22 +51,12 @@ int main()
latVar.setChunking(NcVar::nc_CHUNKED,chunks);

cout<<"Setting Filter....";
try{
latVar.setFilter(BZIP2_ID,BZIP2_NPARAMS,&level);
cout<<"Success."<<endl;
} catch (NcException &e){
cout<<"Caught unexpected exception." << endl;
return e.errorCode();
}
latVar.setFilter(BZIP2_ID,BZIP2_NPARAMS,&level);
cout<<"Success\n";

cout<<"Getting filter...";
try{
latVar.getFilter(&idp,&nparamsp, &level);
cout<<"Success."<<endl;
} catch (NcException &e){
cout<<"Caught unexpected exception." << endl;
return e.errorCode();
}
latVar.getFilter(&idp,&nparamsp, &level);
cout<<"Success\n";
}
catch (NcException& e)
{
Expand Down

0 comments on commit 88650e3

Please sign in to comment.