How do I throw an exception class from C?

Brad Clements bkc at
Wed Aug 11 18:52:39 CEST 1999

In my swig'd module  I can easily throw an exception string or tuple, but
how do I throw an exception class?

I want to create a new exception type that is a class, create a class object
with some init data, then set the exception for the current thread to that

Easy in Python, hard in C. How do I do it?


Brad Clements,
bkc at

More information about the Python-list mailing list