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

Method getPyObject

src/Base/Exception.cpp:92–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90}
91
92PyObject* Exception::getPyObject()
93{
94 Py::Dict edict;
95 edict.setItem("sclassname", Py::String(typeid(*this).name()));
96 edict.setItem("sErrMsg", Py::String(getMessage()));
97 edict.setItem("sfile", Py::String(getFile()));
98 edict.setItem("iline", Py::Long(getLine()));
99 edict.setItem("sfunction", Py::String(getFunction()));
100 edict.setItem("swhat", Py::String(what()));
101 edict.setItem("btranslatable", Py::Boolean(getTranslatable()));
102 edict.setItem("breported", Py::Boolean(hasBeenReported));
103 return new_reference_to(edict);
104}
105
106void Exception::setPyObject(PyObject* pydict)
107{

Callers

nothing calls this directly

Calls 8

getFunctionFunction · 0.85
whatFunction · 0.85
new_reference_toFunction · 0.85
StringClass · 0.70
getMessageFunction · 0.50
getLineFunction · 0.50
nameMethod · 0.45
fileNameMethod · 0.45

Tested by

no test coverage detected