Catch std::exception

git-svn-id: svn://136.177.114.72/svn_GW/IPhreeqc/trunk@10087 1feff8c3-07ed-0310-ac33-dd36852eb9cd
This commit is contained in:
David L Parkhurst 2015-08-17 13:11:41 +00:00
parent 33aa0bc2cc
commit 65e8272554

View File

@ -742,6 +742,20 @@ int IPhreeqc::RunAccumulated(void)
{
// do nothing
}
catch(std::exception &e)
{
std::string errmsg("RunAccumulated: ");
errmsg += e.what();
try
{
this->PhreeqcPtr->error_msg(errmsg.c_str(), STOP); // throws PhreeqcStop
}
catch (IPhreeqcStop)
{
// do nothing
}
throw;
}
catch(...)
{
const char *errmsg = "RunAccumulated: An unhandled exception occured.\n";
@ -799,6 +813,20 @@ int IPhreeqc::RunFile(const char* filename)
{
this->close_input_files();
}
catch(std::exception &e)
{
std::string errmsg("RunFile: ");
errmsg += e.what();
try
{
this->PhreeqcPtr->error_msg(errmsg.c_str(), STOP); // throws PhreeqcStop
}
catch (IPhreeqcStop)
{
// do nothing
}
throw;
}
catch(...)
{
const char *errmsg = "RunFile: An unhandled exception occured.\n";