On Jul 06, 2012, at 11:59 PM, Dag Sverre Seljebotn wrote: >>The generated code does a `catch(...)` so you lose that useful information. >>AFAICT, there's no way to find out within the catch clause (or anything >>called by that clause) what C++ exception occurred. > >But that requires something more than a catch(...), right? There must be more >syntax introduced in the Cython language to map C++ exceptions to constructor >functions (taking exceptions of different types). Do you have a concrete >proposal for how that could look like?
What about:
cdef void raise_fooexc(e) except *:
raise MyPythonError(e.detail_1, e.detail_2)
cdef func(self) except +raise_fooexc(exception_type):
something_that_raises_exception_type()
?
Then `exception_type` would get stuffed inside the catch() instead of ...
Cheers,
-Barry
signature.asc
Description: PGP signature
_______________________________________________ cython-devel mailing list [email protected] http://mail.python.org/mailman/listinfo/cython-devel
