MCPcopy Create free account
hub / github.com/SimVascular/SimVascular / PyUtilResetException

Function PyUtilResetException

Code/Source/PythonAPI/PyUtils.cxx:166–172  ·  view source on GitHub ↗

---------------------- PyUtilResetException ---------------------- Take a Python C API exception and resuse it for the given pyRunTimeErr type. This is used to take the value of the exceptions generated by PyArg_ParseTuple() (e.g. improper argument types) and use them in SV custom module exception.

Source from the content-addressed store, hash-verified

164// (e.g. improper argument types) and use them in SV custom module exception.
165//
166PyObject * PyUtilResetException(PyObject * pyRunTimeErr)
167{
168 PyObject *type, *value, *traceback;
169 PyErr_Fetch(&type, &value, &traceback);
170 PyErr_Restore(pyRunTimeErr, value, traceback);
171 return nullptr;
172}
173
174//--------------------------------
175// PyUtilComputeDistPointsToPlane

Callers 2

argsErrorMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected