made catch(...) always rethrow;

changed catches to const references


git-svn-id: svn://136.177.114.72/svn_GW/IPhreeqc/trunk@8905 1feff8c3-07ed-0310-ac33-dd36852eb9cd
This commit is contained in:
Scott R Charlton 2014-08-05 02:42:09 +00:00
parent 60c7fdfe68
commit 5bd2cae399
3 changed files with 8 additions and 1 deletions

View File

@ -168,6 +168,7 @@ int CSelectedOutput::PushBack(const char* key, const CVar& var)
catch(...) catch(...)
{ {
ASSERT(false); ASSERT(false);
throw;
} }
return 1; // error return 1; // error
} }

View File

@ -112,6 +112,7 @@ VRESULT IPhreeqc::AccumulateLine(const char *line)
catch (...) catch (...)
{ {
this->AddError("AccumulateLine: An unhandled exception occured.\n"); this->AddError("AccumulateLine: An unhandled exception occured.\n");
throw;
} }
return VR_OUTOFMEMORY; return VR_OUTOFMEMORY;
} }
@ -600,6 +601,7 @@ int IPhreeqc::load_db(const char* filename)
{ {
// do nothing // do nothing
} }
throw;
} }
this->PhreeqcPtr->phrq_io->clear_istream(); this->PhreeqcPtr->phrq_io->clear_istream();
this->DatabaseLoaded = (this->PhreeqcPtr->get_input_errors() == 0); this->DatabaseLoaded = (this->PhreeqcPtr->get_input_errors() == 0);
@ -662,6 +664,7 @@ int IPhreeqc::load_db_str(const char* input)
{ {
// do nothing // do nothing
} }
throw;
} }
this->PhreeqcPtr->phrq_io->clear_istream(); this->PhreeqcPtr->phrq_io->clear_istream();
@ -750,6 +753,7 @@ int IPhreeqc::RunAccumulated(void)
{ {
// do nothing // do nothing
} }
throw;
} }
this->ClearAccumulated = true; this->ClearAccumulated = true;
@ -806,6 +810,7 @@ int IPhreeqc::RunFile(const char* filename)
{ {
// do nothing // do nothing
} }
throw;
} }
this->close_output_files(); this->close_output_files();
@ -854,6 +859,7 @@ int IPhreeqc::RunString(const char* input)
{ {
// do nothing // do nothing
} }
throw;
} }
this->close_output_files(); this->close_output_files();

View File

@ -1003,7 +1003,7 @@ IPhreeqcLib::CreateIPhreeqc(void)
IPhreeqcPtr = new IPhreeqc; IPhreeqcPtr = new IPhreeqc;
n = (int) IPhreeqcPtr->Index; n = (int) IPhreeqcPtr->Index;
} }
catch(...) catch (const std::bad_alloc&)
{ {
return IPQ_OUTOFMEMORY; return IPQ_OUTOFMEMORY;
} }