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.
This commit is contained in:
Yichen
2021-05-27 23:00:18 +08:00
committed by GitHub
parent 14023c9cda
commit 3ac690b88b
8 changed files with 59 additions and 3 deletions

View File

@@ -7,6 +7,7 @@
BSD-style license that can be found in the LICENSE file.
*/
#include "test_exceptions.h"
#include "pybind11_tests.h"
// A type that should be raised as an exception in Python
@@ -228,4 +229,5 @@ TEST_SUBMODULE(exceptions, m) {
// Test repr that cannot be displayed
m.def("simple_bool_passthrough", [](bool x) {return x;});
m.def("throw_should_be_translated_to_key_error", []() { throw shared_exception(); });
}