Module handling its own hierarchy of exceptions

Vincent Bernat vincent.bernat at raysa.org
Sun May 11 17:34:52 EDT 2003


OoO Pendant le repas du dimanche 11 mai 2003, vers 19:10, Vincent
Bernat <vincent.bernat at raysa.org> disait:

> I am writing a Python module in C and I would like to allow it to
> raise some exceptions. I know how to raise builtin exceptions and
> simple custom exceptions. I would like to use a hierarchy of
> exception, something like this :
[...]

I have finally found the example I searched for: PyPgSQL gives a good
example on how to do it.
-- 
panic("Aarggh: attempting to free lock with active wait queue - shoot Andy");
	2.0.38 /usr/src/linux/fs/locks.c




More information about the Python-list mailing list