Lines Matching defs:MyException5
51 class MyException5 : public std::logic_error {
53 explicit MyException5(const std::string &what) : std::logic_error(what) {}
56 // Inherits from MyException5
57 class MyException5_1 : public MyException5 {
58 using MyException5::MyException5;
108 auto ex5 = py::register_exception<MyException5>(m, "MyException5");
109 // A slightly more complicated one that declares MyException5_1 as a subclass of MyException5
116 m.def("throws5", []() { throw MyException5("this is a helper-defined translated exception"); });
117 m.def("throws5_1", []() { throw MyException5_1("MyException5 subclass"); });