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

Class MyException6

tests/test_exceptions.cpp:83–90  ·  view source on GitHub ↗

Exception that will be caught via the module local translator.

Source from the content-addressed store, hash-verified

81
82// Exception that will be caught via the module local translator.
83class MyException6 : public std::exception {
84public:
85 explicit MyException6(const char *m) : message{m} {}
86 const char *what() const noexcept override { return message.c_str(); }
87
88private:
89 std::string message = "";
90};
91
92struct PythonCallInDestructor {
93 explicit PythonCallInDestructor(const py::dict &d) : d(d) {}

Callers 1

TEST_SUBMODULEFunction · 0.85

Calls

no outgoing calls

Tested by 1

TEST_SUBMODULEFunction · 0.68