Skip to content

Commit

Permalink
extend error type message with more information - display the argumen…
Browse files Browse the repository at this point in the history
…ts that are passed
  • Loading branch information
NikolajBjorner committed Nov 6, 2022
1 parent 4c1a3fa commit 78f9e6b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ast/ast.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2250,7 +2250,9 @@ app * ast_manager::mk_app(func_decl * decl, unsigned num_args, expr * const * ar
if (type_error) {
std::ostringstream buffer;
buffer << "Wrong number of arguments (" << num_args
<< ") passed to function " << mk_pp(decl, *this);
<< ") passed to function " << mk_pp(decl, *this) << " ";
for (unsigned i = 0; i < num_args; ++i)
buffer << "\narg: " << mk_pp(args[i], *this) << "\n";
throw ast_exception(std::move(buffer).str());
}
app * r = nullptr;
Expand Down

0 comments on commit 78f9e6b

Please sign in to comment.