Lines Matching refs:MyException
13 class MyException : public std::exception {
15 explicit MyException(const char * m) : message{m} {}
39 // A type that should be translated to MyException
74 static py::exception<MyException> ex(m, "MyException");
78 } catch (const MyException &e) {
79 // Set MyException as the active python error
98 // translator for MyException by throwing a new exception
103 throw MyException(e.what());
112 m.def("throws1", []() { throw MyException("this error should go to a custom type"); });