Searched refs:MyException5 (Results 1 - 2 of 2) sorted by relevance

/gem5/ext/pybind11/tests/
H A Dtest_exceptions.py83 with pytest.raises(m.MyException5) as excinfo:
88 with pytest.raises(m.MyException5) as excinfo:
90 assert msg(excinfo.value) == "MyException5 subclass"
95 assert msg(excinfo.value) == "MyException5 subclass"
97 with pytest.raises(m.MyException5) as excinfo:
112 raise m.MyException5("nested error 5")
118 m.try_catch(m.MyException5, throw_myex5)
119 assert str(capture).startswith("MyException5: nested error 5")
123 m.try_catch(m.MyException5, throw_myex)
135 m.MyException5, pycatc
[all...]
H A Dtest_exceptions.cpp51 class MyException5 : public std::logic_error { class in inherits:std::logic_error
53 explicit MyException5(const std::string &what) : std::logic_error(what) {} function in class:MyException5
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("thi
[all...]

Completed in 4 milliseconds