MCPcopy Create free account
hub / github.com/FreeCAD/FreeCAD / PyException

Method PyException

src/Base/Interpreter.cpp:45–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43using namespace Base;
44
45PyException::PyException(const Py::Object& obj)
46{
47 setMessage(obj.as_string());
48 // WARNING: we are assuming that python type object will never be
49 // destroyed, so we don't keep reference here to save book-keeping in
50 // our copy constructor and destructor
51 // NOLINTBEGIN
52 _exceptionType = reinterpret_cast<PyObject*>(obj.ptr()->ob_type);
53 _errorType = obj.ptr()->ob_type->tp_name;
54 // NOLINTEND
55}
56
57PyException::PyException()
58{

Callers

nothing calls this directly

Calls 3

PP_Fetch_Error_TextFunction · 0.85
as_stringMethod · 0.45
ptrMethod · 0.45

Tested by

no test coverage detected