MCPcopy Create free account
hub / github.com/pybind/pybind11 / MyException4

Class MyException4

tests/test_exceptions.cpp:62–69  ·  view source on GitHub ↗

A type that should be translated to MyException and delegated to its exception translator

Source from the content-addressed store, hash-verified

60// A type that should be translated to MyException
61// and delegated to its exception translator
62class MyException4 : public std::exception {
63public:
64 explicit MyException4(const char *m) : message{m} {}
65 const char *what() const noexcept override { return message.c_str(); }
66
67private:
68 std::string message = "";
69};
70
71// Like the above, but declared via the helper function
72class MyException5 : public std::logic_error {

Callers 1

TEST_SUBMODULEFunction · 0.85

Calls

no outgoing calls

Tested by 1

TEST_SUBMODULEFunction · 0.68