From 78f9e6b31a9f2defc7be77ed263469649208dfe7 Mon Sep 17 00:00:00 2001 From: Nikolaj Bjorner Date: Sun, 6 Nov 2022 11:57:21 -0800 Subject: [PATCH] extend error type message with more information - display the arguments that are passed --- src/ast/ast.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ast/ast.cpp b/src/ast/ast.cpp index 50b9e5a4d..7bb732a5d 100644 --- a/src/ast/ast.cpp +++ b/src/ast/ast.cpp @@ -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;