Searched refs:MyException (Results 1 - 3 of 3) sorted by relevance

/gem5/ext/pybind11/tests/
H A Dtest_exceptions.py57 # Can we catch a MyException?
58 with pytest.raises(m.MyException) as excinfo:
73 with pytest.raises(m.MyException) as excinfo:
109 raise m.MyException("nested error")
122 with pytest.raises(m.MyException) as excinfo:
129 except m.MyException as e:
135 m.MyException5, pycatch, m.MyException, m.try_catch, m.MyException, throw_myex5)
140 m.try_catch(m.MyException, pycatch, m.MyException5, m.throws4)
145 m.try_catch(m.MyException, pycatc
[all...]
H A Dtest_exceptions.cpp13 class MyException : public std::exception { class in inherits:std::exception
15 explicit MyException(const char * m) : message{m} {} function in class:MyException
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("thi
[all...]
/gem5/ext/googletest/googlemock/test/
H A Dgmock-more-actions_test.cc605 class MyException {}; class in namespace:testing::gmock_more_actions_test
608 const Action<double(char ch)> a = Throw(MyException());
609 EXPECT_THROW(a.Perform(make_tuple('0')), MyException);
613 const Action<double()> a = Throw(MyException());
614 EXPECT_THROW(a.Perform(make_tuple()), MyException);

Completed in 8 milliseconds