mirror of
https://github.com/pybind/pybind11.git
synced 2025-02-16 21:57:55 +00:00
Increase available information on invocation error.
This commit is contained in:
parent
bd986fe57e
commit
16d4394845
@ -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<std::string>(static_cast<object>(args_[ti]).str());
|
||||
if ((ti + 1) != args_.size() )
|
||||
msg += ", ";
|
||||
}
|
||||
PyErr_SetString(PyExc_TypeError, msg.c_str());
|
||||
return nullptr;
|
||||
} else if (!result) {
|
||||
|
Loading…
Reference in New Issue
Block a user