@@ -43,15 +43,23 @@ at its exception handler.
43
43
| | of bounds access in ``__getitem__ ``, |
44
44
| | ``__setitem__ ``, etc.) |
45
45
+--------------------------------------+--------------------------------------+
46
- | :class: `pybind11::value_error ` | ``ValueError `` (used to indicate |
47
- | | wrong value passed in |
48
- | | ``container.remove(...) ``) |
49
- +--------------------------------------+--------------------------------------+
50
46
| :class: `pybind11::key_error ` | ``KeyError `` (used to indicate out |
51
47
| | of bounds access in ``__getitem__ ``, |
52
48
| | ``__setitem__ `` in dict-like |
53
49
| | objects, etc.) |
54
50
+--------------------------------------+--------------------------------------+
51
+ | :class: `pybind11::value_error ` | ``ValueError `` (used to indicate |
52
+ | | wrong value passed in |
53
+ | | ``container.remove(...) ``) |
54
+ +--------------------------------------+--------------------------------------+
55
+ | :class: `pybind11::type_error ` | ``TypeError `` |
56
+ +--------------------------------------+--------------------------------------+
57
+ | :class: `pybind11::buffer_error ` | ``BufferError `` |
58
+ +--------------------------------------+--------------------------------------+
59
+ | :class: `pybind11::import_error ` | ``import_error `` |
60
+ +--------------------------------------+--------------------------------------+
61
+ | Any other exception | ``RuntimeError `` |
62
+ +--------------------------------------+--------------------------------------+
55
63
56
64
Exception translation is not bidirectional. That is, *catching * the C++
57
65
exceptions defined above above will not trap exceptions that originate from
0 commit comments