Yichen
3ac690b88b
Explicitly export exception types. ( #2999 )
...
* Set visibility of exceptions to default.
Co-authored-by: XZiar <czktc2007@gmail.com>
* add test
* update docs
* Skip failed test.
2021-05-27 08:00:18 -07:00
Andy Maloney
14b375123c
docs: fix example code in Exceptions section (match vs. matches) ( #2781 )
2021-01-13 23:14:45 -05:00
Jean-Baptiste Lespiau
af8849f47e
docs: list all pybind11 exceptions ( #2671 )
...
* List all the pyind11 exceptions.
For curious readers, see `translate_exception` and
`PYBIND11_RUNTIME_EXCEPTION.
2020-11-19 10:11:55 -05:00
Henry Schreiner
6bcd220c8d
refactor: module -> module_ with typedef ( #2544 )
...
* WIP: module -> module_ without typedef
* refactor: allow py::module to work again
2020-10-03 13:38:03 -04:00
Yannick Jadoul
16f199f8d9
Change base parameter type in register_exception and exception constructor from PyObject* to handle ( #2467 )
...
* Change base parameter type in register_exception and excepion constructor from PyObject* to handle
* Fix compilation error passing `handle` to `PyObject*`
2020-09-15 10:24:39 -04:00
michalsustr
3bd0d7a8d5
Add note about specifying custom base class for Exceptions. ( #2465 )
...
* Add note about specifying custom base.
* Update exception docs based on PR feedback.
* Fix trailing whitespace.
Co-authored-by: Michal Sustr <michal.sustr@aic.fel.cvut.cz>
2020-09-06 13:35:53 +02:00
jbarlow83
b8863698d6
Improve documentation of Python and C++ exceptions ( #2408 )
...
The main change is to treat error_already_set as a separate category
of exception that arises in different circumstances and needs to be
handled differently. The asymmetry between Python and C++ exceptions
is further emphasized.
2020-08-23 00:11:09 +02:00
Henry Schreiner
a6887b604a
docs: update changelog and versionadded
2020-08-20 14:42:00 -04:00
James R. Barlow
3618bea2aa
Add and document py::error_already_set::discard_as_unraisable()
...
To deal with exceptions that hit destructors or other noexcept functions.
Includes fixes to support Python 2.7 and extends documentation on
error handling.
@virtuald and @YannickJadoul both contributed to this PR.
2020-08-16 10:05:03 -07:00
Francesco Biscani
deb3cb238a
Add exception translation for std::overflow_error. ( #1977 )
2019-11-14 08:56:58 +01:00
Wenzel Jakob
51ca6b0832
Update docs on std::out_of_range exception mapping ( #1254 )
2019-06-11 23:28:58 +02:00
Antony Lee
8fbb5594fd
Clarify error_already_set documentation.
2018-04-09 16:25:04 -03:00
luz.paz
28cb6764fc
misc. typos
...
Found via `codespell`
2018-01-11 16:39:50 -04:00
Dean Moldovan
67b52d808e
Reorganize documentation
2016-10-20 15:21:34 +02:00