mirror of
https://github.com/RYDE-WORK/pybind11.git
synced 2026-02-02 04:53:26 +08: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 += it2->signature;
|
||||||
msg += "\n";
|
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());
|
PyErr_SetString(PyExc_TypeError, msg.c_str());
|
||||||
return nullptr;
|
return nullptr;
|
||||||
} else if (!result) {
|
} else if (!result) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user