mirror of
https://github.com/Unidata/netcdf-cxx4.git
synced 2024-11-21 03:13:46 +08:00
Report errors correctly in examples
This commit is contained in:
parent
f2f094da7b
commit
2c6d86a6b9
@ -36,7 +36,7 @@ try
|
||||
}
|
||||
catch (NcException& e)
|
||||
{
|
||||
cout << "unknown error"<<endl;
|
||||
e.what();
|
||||
cout << e.what() << endl;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
}
|
||||
|
@ -116,8 +116,8 @@ int main()
|
||||
}
|
||||
catch(NcException& e)
|
||||
{
|
||||
e.what();
|
||||
cout<<"FAILURE**************************"<<endl;
|
||||
cout<<"FAILURE**************************\n";
|
||||
cout << e.what() << endl;
|
||||
return NC_ERR;
|
||||
}
|
||||
|
||||
|
@ -189,7 +189,8 @@ int main()
|
||||
}
|
||||
catch(NcException& e)
|
||||
{
|
||||
e.what();
|
||||
cout<<"FAILURE**************************\n";
|
||||
cout << e.what() << endl;
|
||||
return NC_ERR;
|
||||
}
|
||||
}
|
||||
|
@ -116,8 +116,8 @@ int main()
|
||||
}
|
||||
catch(NcException& e)
|
||||
{
|
||||
e.what();
|
||||
cout<<"FAILURE**************************"<<endl;
|
||||
cout<<"FAILURE**************************\n";
|
||||
cout << e.what() << endl;
|
||||
return NC_ERR;
|
||||
}
|
||||
|
||||
|
@ -162,7 +162,8 @@ int main()
|
||||
}
|
||||
catch(NcException& e)
|
||||
{
|
||||
e.what();
|
||||
cout<<"FAILURE**************************\n";
|
||||
cout << e.what() << endl;
|
||||
return NC_ERR;
|
||||
}
|
||||
}
|
||||
|
@ -151,8 +151,8 @@ int main(void)
|
||||
}
|
||||
catch(NcException e)
|
||||
{
|
||||
e.what();
|
||||
cout<<"FAILURE********************************8"<<endl;
|
||||
return NC_ERR;
|
||||
cout<<"FAILURE**************************\n";
|
||||
cout << e.what() << endl;
|
||||
return NC_ERR;
|
||||
}
|
||||
}
|
||||
|
@ -138,7 +138,8 @@ int main(void)
|
||||
}
|
||||
catch(NcException& e)
|
||||
{
|
||||
e.what();
|
||||
cout<<"FAILURE**************************\n";
|
||||
cout << e.what() << endl;
|
||||
return NC_ERR;
|
||||
}
|
||||
}
|
||||
|
@ -54,8 +54,8 @@ int main()
|
||||
return 0;
|
||||
}catch(NcException& e)
|
||||
{
|
||||
e.what();
|
||||
cout<<"FAILURE*************************************"<<endl;
|
||||
return NC_ERR;
|
||||
cout<<"FAILURE**************************\n";
|
||||
cout << e.what() << endl;
|
||||
return NC_ERR;
|
||||
}
|
||||
}
|
||||
|
@ -76,7 +76,9 @@ int main()
|
||||
return 0;
|
||||
}
|
||||
catch(NcException& e)
|
||||
{e.what();
|
||||
{
|
||||
cout<<"FAILURE**************************\n";
|
||||
cout << e.what() << endl;
|
||||
return NC_ERR;
|
||||
}
|
||||
}
|
||||
|
@ -78,7 +78,9 @@ int create_file(string filename, NcFile::FileFormat format) {
|
||||
return 0;
|
||||
}
|
||||
catch(NcException& e)
|
||||
{e.what();
|
||||
{
|
||||
cout<<"FAILURE**************************\n";
|
||||
cout << e.what() << endl;
|
||||
return NC_ERR;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user