You seem to have misunderstood me here. I am **not** trying to suppress the exception. I
am trying to make sure that the programmer gets the **correct** exception (`TypeError`)
handed to them.
The Python C interface documentation is pretty clear on this point. You MUST return NULL
instead of a `PyObject*` when your C code has set an exception. The resulting
`SystemError`, on top of the `TypeError` the calling Python code *should* be getting, is a
pretty clear and unequivocal demonstration of this, and it even says what's wrong
("SystemError: <built-in function sets> returned a result with an exception
set"). See my bug report for the example stack trace.
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/4044#issuecomment-2508915041
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/4044/c2508915041(a)github.com>