diff --git a/include/pybind11/pybind11.h b/include/pybind11/pybind11.h index ee76a670..02d81e6f 100644 --- a/include/pybind11/pybind11.h +++ b/include/pybind11/pybind11.h @@ -422,6 +422,14 @@ protected: msg += it2->signature; msg += "\n"; } + msg += " Invoked with: "; + tuple args_(args, true); + for( std::size_t ti = 0; ti != args_.size(); ++ti) + { + msg += static_cast(static_cast(args_[ti]).str()); + if ((ti + 1) != args_.size() ) + msg += ", "; + } PyErr_SetString(PyExc_TypeError, msg.c_str()); return nullptr; } else if (!result) {