diff --git a/src/ParsingDriver.cc b/src/ParsingDriver.cc index bee717bbdfd9f2b2c78136710e4ed91edd422561..c61a1f193fe08e588b8afcbf61dd4c17d0a48359 100644 --- a/src/ParsingDriver.cc +++ b/src/ParsingDriver.cc @@ -1413,8 +1413,12 @@ ParsingDriver::option_symbol_list(string name_option) { vector<string> shocks = symbol_list.get_symbols(); for (auto &shock : shocks) - if (mod_file->symbol_table.getType(shock) != SymbolType::exogenous) - error("Variables passed to irf_shocks must be exogenous. Caused by: " + shock); + { + if (!mod_file->symbol_table.exists(shock)) + error("Unknown symbol: " + shock); + if (mod_file->symbol_table.getType(shock) != SymbolType::exogenous) + error("Variables passed to irf_shocks must be exogenous. Caused by: " + shock); + } } if (name_option.compare("ms.parameters") == 0)