3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-26 10:35:33 +00:00

improve error messages on incorrect parameter passing

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2014-10-15 21:37:37 -07:00
parent 097f4c3a34
commit 7767a23626
3 changed files with 25 additions and 8 deletions

View file

@ -86,7 +86,13 @@ void context_params::set(char const * param, char const * value) {
set_bool(m_smtlib2_compliant, param, value);
}
else {
throw default_exception("unknown parameter '%s'", p.c_str());
param_descrs d;
collect_param_descrs(d);
std::stringstream strm;
strm << "unknown parameter '" << p << "'\n";
strm << "Legal parameters are:\n";
d.display(strm, 2, false, false);
throw default_exception(strm.str());
}
}