diff --git a/src/AtomicGroup.i b/src/AtomicGroup.i index 28abcc407..3bc2b19a9 100644 --- a/src/AtomicGroup.i +++ b/src/AtomicGroup.i @@ -71,7 +71,7 @@ pAtom __next__() { if (_idx >= _ag->size()) - throw(loos::StopIteration()); + throw(StopIteration()); return((*_ag)[_idx++]); } @@ -85,6 +85,7 @@ %} +%catches(loos::StopIteration) loos::AtomicGroupPythonIterator::__next__(); // Translate C++ exception into Python's %typemap(throws) loos::StopIteration %{