v4 preprocessor: catch evaluation error in ModelTree::evaluateJacobian to avoid abrupt program exiting

git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1776 ac1d8469-bf42-47a9-8791-bf33cf982152
issue#70
sebastien 2008-04-02 15:18:51 +00:00
parent 7875105bd6
commit ed15887221
1 changed files with 9 additions and 1 deletions

View File

@ -3592,7 +3592,15 @@ ModelTree::evaluateJacobian(const eval_context_type &eval_context, jacob_map *j_
if (variable_table.getType(it->first.second) == eEndogenous)
{
NodeID Id = it->second;
double val = Id->eval(eval_context);
double val;
try
{
val = Id->eval(eval_context);
}
catch(ExprNode::EvalException &e)
{
cerr << "ModelTree::evaluateJacobian: evaluation of Jacobian failed!" << endl;
}
int eq=it->first.first;
int var=variable_table.getSymbolID(it->first.second);
int k1=variable_table.getLag(it->first.second);