Commit efed83f7 authored by sebastien's avatar sebastien
Browse files

v4 preprocessor: catch evaluation error in ModelTree::evaluateJacobian to...

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
parent 694496ee
......@@ -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);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment