MCPcopy Create free account
hub / github.com/wjakob/nanobind / ~python_error

Method ~python_error

src/error.cpp:34–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32}
33
34python_error::~python_error() {
35 if (m_value) {
36 gil_scoped_acquire acq;
37 /* With GIL held */ {
38 // Clear error status in case the following executes Python code
39 error_scope scope;
40 Py_DECREF(m_value);
41 }
42 }
43
44 free(m_what);
45}
46
47python_error::python_error(const python_error &e)
48 : std::exception(e), m_value(e.m_value) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected