made catch(...) always rethrow;

changed catches to const references


git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@8906 1feff8c3-07ed-0310-ac33-dd36852eb9cd
This commit is contained in:
Scott R Charlton 2014-08-05 02:49:22 +00:00
parent f2a25dacfa
commit fbb95d10b0
3 changed files with 23 additions and 23 deletions

View File

@ -110,7 +110,7 @@ basic_compile(char *commands, void **lnbase, void **vbase, void **lpbase)
}
while (!(exitflag || P_eof()));
}
catch (PBasicStop e)
catch (const PBasicStop& e)
{
if (P_escapecode != -20)
{
@ -138,7 +138,7 @@ basic_compile(char *commands, void **lnbase, void **vbase, void **lpbase)
}
}
}
catch (PhreeqcStop s)
catch (const PhreeqcStop& s)
{
// clean up memory
disposetokens(&buf);
@ -146,7 +146,7 @@ basic_compile(char *commands, void **lnbase, void **vbase, void **lpbase)
*lnbase = (void *) linebase;
*vbase = (void *) varbase;
*lpbase = (void *) loopbase;
throw s;
throw; // rethrow
}
}
while (!(exitflag || P_eof()));
@ -214,7 +214,7 @@ basic_renumber(char *commands, void **lnbase, void **vbase, void **lpbase)
}
while (!(exitflag || P_eof()));
}
catch (PBasicStop e)
catch (const PhreeqcStop& e)
{
if (P_escapecode != -20)
{
@ -279,7 +279,7 @@ basic_run(char *commands, void *lnbase, void *vbase, void *lpbase)
}
while (!(exitflag || P_eof()));
}
catch (PBasicStop e)
catch (const PhreeqcStop& e)
{
if (P_escapecode != -20)
{
@ -355,7 +355,7 @@ basic_main(char *commands)
}
while (!(exitflag || P_eof()));
}
catch (PBasicStop e)
catch (const PhreeqcStop& e)
{
if (P_escapecode != -20)
{
@ -3159,9 +3159,9 @@ factor(struct LOC_exec * LINK)
1) * sizeof(int));
if (s_v.subscripts == NULL)
PhreeqcPtr->malloc_error();
s_v.subscripts[s_v.count_subscripts] = j;
s_v.count_subscripts++;
}
s_v.subscripts[s_v.count_subscripts] = j;
s_v.count_subscripts++;
}
else
{
/* get right parentheses */
@ -5155,13 +5155,13 @@ cmdon(struct LOC_exec *LINK)
l = (looprec *) PhreeqcPtr->PHRQ_calloc(1, sizeof(looprec));
if (l == NULL)
PhreeqcPtr->malloc_error();
l->next = loopbase;
loopbase = l;
l->kind = gosubloop;
l->homeline = stmtline;
l->hometok = LINK->t;
LINK->t = LINK->t->next;
}
l->next = loopbase;
loopbase = l;
l->kind = gosubloop;
l->homeline = stmtline;
l->hometok = LINK->t;
LINK->t = LINK->t->next;
}
else
require(tokgoto, LINK);
if (i < 1)
@ -5517,7 +5517,7 @@ exec(void)
}
while (stmtline != NULL);
}
catch (PBasicStop e)
catch (const PhreeqcStop& e)
{
//_Ltry1:
if (P_escapecode == -20)

View File

@ -490,7 +490,7 @@ process_file_names(int argc, char *argv[], std::istream **db_cookie,
*db_cookie = new std::ifstream(db_file, std::ios_base::in);
*input_cookie = new std::ifstream(in_file, std::ios_base::in);
}
catch (PhreeqcStop e)
catch (const PhreeqcStop& e)
{
return get_input_errors();
}
@ -681,7 +681,7 @@ process_file_names(int argc, char *argv[], std::istream **db_cookie,
*db_cookie = new std::ifstream(db_file, std::ios_base::in);
*input_cookie = new std::ifstream(in_file, std::ios_base::in);
}
catch (PhreeqcStop e)
catch (const PhreeqcStop& e)
{
return get_input_errors();
}

View File

@ -2308,7 +2308,7 @@ read_database(void)
tidy_model();
status(0, NULL);
}
catch (PhreeqcStop e)
catch (const PhreeqcStop&)
{
return get_input_errors();
}
@ -2445,7 +2445,7 @@ run_simulations(void)
#endif
}
}
catch (PhreeqcStop e)
catch (const PhreeqcStop&)
{
return get_input_errors();
}
@ -2466,7 +2466,7 @@ do_initialize(void)
initialize();
}
catch (PhreeqcStop e)
catch (const PhreeqcStop&)
{
return get_input_errors();
}
@ -2496,7 +2496,7 @@ do_status(void)
phrq_io->output_flush();
phrq_io->error_flush();
}
catch (PhreeqcStop e)
catch (const PhreeqcStop&)
{
return get_input_errors();
}