Catch exception by reference

This commit is contained in:
Peter Hill 2022-02-23 17:56:37 +00:00
parent 2c6d86a6b9
commit 1eafd5f5c9
No known key found for this signature in database
GPG Key ID: 54B71ECD1C23E787

View File

@ -149,7 +149,7 @@ int main(void)
//cout << "*** SUCCESS reading example file sfc_pres_temp.nc!" << endl;
return 0;
}
catch(NcException e)
catch(NcException& e)
{
cout<<"FAILURE**************************\n";
cout << e.what() << endl;