Implement PyErr_Occurred for external function calls
Check object -> integral conversions for errors with PyErr_Occurred