From 4461544efdab77370c6981a6f7aceeffc29fd39f Mon Sep 17 00:00:00 2001 From: Johannes Pfeifer Date: Thu, 4 Nov 2021 09:04:26 +0100 Subject: [PATCH] Expand cryptic error message if a value is assigned a second time --- dynare++/parser/cc/atom_assignings.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dynare++/parser/cc/atom_assignings.cc b/dynare++/parser/cc/atom_assignings.cc index a3dc17a61..e71940463 100644 --- a/dynare++/parser/cc/atom_assignings.cc +++ b/dynare++/parser/cc/atom_assignings.cc @@ -147,7 +147,7 @@ AtomAssignings::add_assignment(int asgn_off, const string &str, int name_len, if (lname2expr.find(name) != lname2expr.end()) { // Prevent the occurrence of #415 - std::cerr << "Changing the value of " << name << " is not supported. Aborting." << std::endl; + std::cerr << "Changing the value of " << name << " through a second assignment (e.g. in initval) is not supported. Aborting." << std::endl; exit(EXIT_FAILURE); } lname2expr[name] = order.size()-1;