remove bool from as() (it now always throws).
catch std::invalid_argument (what is expected) instread of std::exception.
This commit is contained in:
parent
bfaafde020
commit
b229d92f9b
2 changed files with 9 additions and 10 deletions
|
|
@ -434,8 +434,8 @@ namespace swig
|
|||
{
|
||||
swig::SwigVar_PyObject item = PySequence_GetItem(_seq, _index);
|
||||
try {
|
||||
return swig::as<T>(item, true);
|
||||
} catch (std::exception& e) {
|
||||
return swig::as<T>(item);
|
||||
} catch (const std::invalid_argument& e) {
|
||||
char msg[1024];
|
||||
sprintf(msg, "in sequence element %d ", (int)_index);
|
||||
if (!PyErr_Occurred()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue