Lines Matching refs:def
69 m.def("throw_std_exception", []() {
112 m.def("throws1", []() { throw MyException("this error should go to a custom type"); });
113 m.def("throws2", []() { throw MyException2("this error should go to a standard Python exception"); });
114 m.def("throws3", []() { throw MyException3("this error cannot be translated"); });
115 m.def("throws4", []() { throw MyException4("this error is rethrown"); });
116 m.def("throws5", []() { throw MyException5("this is a helper-defined translated exception"); });
117 m.def("throws5_1", []() { throw MyException5_1("MyException5 subclass"); });
118 m.def("throws_logic_error", []() { throw std::logic_error("this error should fall through to the standard handler"); });
119 m.def("exception_matches", []() {
131 m.def("exception_matches_base", []() {
143 m.def("modulenotfound_exception_matches_base", []() {
155 m.def("throw_already_set", [](bool err) {
174 m.def("python_call_in_destructor", [](py::dict d) {
186 m.def("try_catch", [m](py::object exc_type, py::function f, py::args args) {