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:
parent
097f4c3a34
commit
7767a23626
3 changed files with 25 additions and 8 deletions
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue