[C++-sig] Custom exceptions
Gavin Doughtie
gdoughtie at anim.dreamworks.com
Fri May 30 23:42:02 CEST 2003
So, let's say I want to register a custom exception which python code
can catch, thusly:
try:
doSomething()
except mymodule.MyException e:
print e
Is there anything in boost python that makes setting this up easy? I've
got a working exception translator and everything, but I don't see
anything equivalent to putting
"PyErr_NewException("mymodule.MyException", NULL, NULL)" into the system
dictionary during module initialization.
Or am I just working too hard again?
--
Gavin Doughtie
DreamWorks SKG
More information about the Cplusplus-sig
mailing list