Skip to content

Commit ef76a4b

Browse files
committed
List all the pyind11 exception and refer to code.
I wanted to know excacly what existed, because I wanted to raise a `RuntimeError`. In practice, it took me quite some time to find where (a) the pybind11 exceptions are defined, (b) how the C++ exceptions are converted to Python ones. At the end, I discovered everything else is converted to RuntimeError, so I do not need to do anything. The link is a result to github search, which may be more robust to moving code around. s#
1 parent 1cd9965 commit ef76a4b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/advanced/exceptions.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ at its exception handler.
6060
+--------------------------------------+--------------------------------------+
6161
| :class:`pybind11::buffer_error` | ``BufferError`` |
6262
+--------------------------------------+--------------------------------------+
63-
| :class:`pybind11::import_error` | ``import_error` |
63+
| :class:`pybind11::import_error` | ``import_error`` |
6464
+--------------------------------------+--------------------------------------+
6565
| Any other exception | ``RuntimeError`` |
6666
+--------------------------------------+--------------------------------------+

0 commit comments

Comments
 (0)