Report errors correctly in examples

This commit is contained in:
Peter Hill 2022-02-23 17:55:53 +00:00
parent f2f094da7b
commit 2c6d86a6b9
No known key found for this signature in database
GPG Key ID: 54B71ECD1C23E787
10 changed files with 24 additions and 17 deletions

View File

@ -36,7 +36,7 @@ try
}
catch (NcException& e)
{
cout << "unknown error"<<endl;
e.what();
cout << e.what() << endl;
return EXIT_FAILURE;
}
}

View File

@ -116,8 +116,8 @@ int main()
}
catch(NcException& e)
{
e.what();
cout<<"FAILURE**************************"<<endl;
cout<<"FAILURE**************************\n";
cout << e.what() << endl;
return NC_ERR;
}

View File

@ -189,7 +189,8 @@ int main()
}
catch(NcException& e)
{
e.what();
cout<<"FAILURE**************************\n";
cout << e.what() << endl;
return NC_ERR;
}
}

View File

@ -116,8 +116,8 @@ int main()
}
catch(NcException& e)
{
e.what();
cout<<"FAILURE**************************"<<endl;
cout<<"FAILURE**************************\n";
cout << e.what() << endl;
return NC_ERR;
}

View File

@ -162,7 +162,8 @@ int main()
}
catch(NcException& e)
{
e.what();
cout<<"FAILURE**************************\n";
cout << e.what() << endl;
return NC_ERR;
}
}

View File

@ -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;
}
}

View File

@ -138,7 +138,8 @@ int main(void)
}
catch(NcException& e)
{
e.what();
cout<<"FAILURE**************************\n";
cout << e.what() << endl;
return NC_ERR;
}
}

View File

@ -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;
}
}

View File

@ -76,7 +76,9 @@ int main()
return 0;
}
catch(NcException& e)
{e.what();
{
cout<<"FAILURE**************************\n";
cout << e.what() << endl;
return NC_ERR;
}
}

View File

@ -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;
}
}