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-bf33cf982152issue#70
parent
7875105bd6
commit
ed15887221
10
ModelTree.cc
10
ModelTree.cc
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue