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

Method throw_something

tests/test_class.cpp:539–539  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

537 PyPrintDestructor(const PyPrintDestructor &) = default;
538 ~PyPrintDestructor() { py::print("Print from destructor"); }
539 void throw_something() { throw std::runtime_error("error"); }
540 };
541 py::class_<PyPrintDestructor>(m, "PyPrintDestructor")
542 .def(py::init<>())

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected