mirror of
https://github.com/pybind/pybind11.git
synced 2026-06-06 06:11:25 +00:00
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:
@@ -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(); });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user