Some C-API functions clear the error indicator?
Antoine Pitrou
solipsis at pitrou.net
Sat Jan 30 08:11:24 EST 2010
Le Fri, 29 Jan 2010 22:25:14 +0100, Austin Bingham a écrit :
> Maybe I'm not following what you're saying. In my case, I already know
> that an exception has been thrown. In the course of processing that
> exception, I call another function which, for whatever reason and even
> when it succeeds, clears the exception indicators.
If you know an error occurred and need to retain it somewhere, just use
PyErr_Fetch() and PyErr_Restore().
Regards
Antoine.
More information about the Python-list
mailing list