diff --git a/src/CSelectedOutput.cpp b/src/CSelectedOutput.cpp index e279ab53..5298f1cb 100644 --- a/src/CSelectedOutput.cpp +++ b/src/CSelectedOutput.cpp @@ -168,6 +168,7 @@ int CSelectedOutput::PushBack(const char* key, const CVar& var) catch(...) { ASSERT(false); + throw; } return 1; // error } diff --git a/src/IPhreeqc.cpp b/src/IPhreeqc.cpp index 88a85ab4..4c8565cd 100644 --- a/src/IPhreeqc.cpp +++ b/src/IPhreeqc.cpp @@ -112,6 +112,7 @@ VRESULT IPhreeqc::AccumulateLine(const char *line) catch (...) { this->AddError("AccumulateLine: An unhandled exception occured.\n"); + throw; } return VR_OUTOFMEMORY; } @@ -600,6 +601,7 @@ int IPhreeqc::load_db(const char* filename) { // do nothing } + throw; } this->PhreeqcPtr->phrq_io->clear_istream(); this->DatabaseLoaded = (this->PhreeqcPtr->get_input_errors() == 0); @@ -662,6 +664,7 @@ int IPhreeqc::load_db_str(const char* input) { // do nothing } + throw; } this->PhreeqcPtr->phrq_io->clear_istream(); @@ -750,6 +753,7 @@ int IPhreeqc::RunAccumulated(void) { // do nothing } + throw; } this->ClearAccumulated = true; @@ -806,6 +810,7 @@ int IPhreeqc::RunFile(const char* filename) { // do nothing } + throw; } this->close_output_files(); @@ -854,6 +859,7 @@ int IPhreeqc::RunString(const char* input) { // do nothing } + throw; } this->close_output_files(); diff --git a/src/IPhreeqcLib.cpp b/src/IPhreeqcLib.cpp index cae2efb8..b61440ff 100644 --- a/src/IPhreeqcLib.cpp +++ b/src/IPhreeqcLib.cpp @@ -1003,7 +1003,7 @@ IPhreeqcLib::CreateIPhreeqc(void) IPhreeqcPtr = new IPhreeqc; n = (int) IPhreeqcPtr->Index; } - catch(...) + catch (const std::bad_alloc&) { return IPQ_OUTOFMEMORY; }