mirror of
https://git.gfz-potsdam.de/naaice/iphreeqc.git
synced 2025-12-16 16:44:49 +01:00
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:
parent
33aa0bc2cc
commit
65e8272554
28
IPhreeqc.cpp
28
IPhreeqc.cpp
@ -742,6 +742,20 @@ int IPhreeqc::RunAccumulated(void)
|
|||||||
{
|
{
|
||||||
// do nothing
|
// 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(...)
|
catch(...)
|
||||||
{
|
{
|
||||||
const char *errmsg = "RunAccumulated: An unhandled exception occured.\n";
|
const char *errmsg = "RunAccumulated: An unhandled exception occured.\n";
|
||||||
@ -799,6 +813,20 @@ int IPhreeqc::RunFile(const char* filename)
|
|||||||
{
|
{
|
||||||
this->close_input_files();
|
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(...)
|
catch(...)
|
||||||
{
|
{
|
||||||
const char *errmsg = "RunFile: An unhandled exception occured.\n";
|
const char *errmsg = "RunFile: An unhandled exception occured.\n";
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user