c - What is the correct return of PyObject_CallObject in the presence of a Python exception? -
all examples can find check return value against null pointer, , yet in our code receiving valid pointer. know exception has occurred because have written log file before , after failing line.
when @ return value says "nonetype": returnvalue->ob_type->tp_name
.
the call returned none object in case, , not null, indicating there no exception far call concerned.
if whatever called used try:
/except
handler, exception has been caught , cleared; purpose of such handler. if need exception propagate further stack, re-raise it:
try: # ... except someexception e: # log information `e` raise
Comments
Post a Comment