mirror of
https://git.gfz-potsdam.de/naaice/iphreeqc.git
synced 2025-12-16 16:44:49 +01:00
Reduced risk during low memory conditions of error message handling
git-svn-id: svn://136.177.114.72/svn_GW/IPhreeqc/branches/class@4185 1feff8c3-07ed-0310-ac33-dd36852eb9cd
This commit is contained in:
parent
6257006116
commit
236c8fdcde
@ -832,19 +832,12 @@ int IPhreeqc::output_handler(const int type, const char *err_str, const int stop
|
|||||||
case OUTPUT_ERROR:
|
case OUTPUT_ERROR:
|
||||||
if (this)
|
if (this)
|
||||||
{
|
{
|
||||||
|
this->AddError("ERROR: ");
|
||||||
|
this->AddError(err_str);
|
||||||
|
this->AddError("\n");
|
||||||
if (stop == STOP)
|
if (stop == STOP)
|
||||||
{
|
{
|
||||||
static std::string str(200, ' ');
|
this->AddError("Stopping.\n");
|
||||||
static std::ostringstream oss(str);
|
|
||||||
oss << "ERROR: " << err_str << "\n";
|
|
||||||
oss << "Stopping.\n";
|
|
||||||
this->AddError(oss.str().c_str());
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
std::ostringstream oss;
|
|
||||||
oss << "ERROR: " << err_str << "\n";
|
|
||||||
this->AddError(oss.str().c_str());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user