From 77a2e6f361f38ab6dd957618c8fc0d01a34a954a Mon Sep 17 00:00:00 2001 From: Robert Bradshaw Date: Thu, 20 Sep 2018 16:01:44 +0200 Subject: Allow catching both C++ and Python exceptions. --- docs/src/userguide/wrapping_CPlusPlus.rst | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'docs') diff --git a/docs/src/userguide/wrapping_CPlusPlus.rst b/docs/src/userguide/wrapping_CPlusPlus.rst index 94c5df5f1..815f24954 100644 --- a/docs/src/userguide/wrapping_CPlusPlus.rst +++ b/docs/src/userguide/wrapping_CPlusPlus.rst @@ -440,6 +440,13 @@ called, which allows one to do custom C++ to Python error "translations." If raise_py_error does not actually raise an exception a RuntimeError will be raised. +There is also the special form:: + + cdef int raise_py_or_cpp() except +* + +for those functions that may raise either a Python or a C++ exception. + + Static member method -------------------- -- cgit v1.2.1