Renaming getPyDict to getPyObject for consistency with BaseClass
This commit is contained in:
@@ -98,7 +98,7 @@ void Exception::ReportException (void) const
|
||||
Console().Error("Exception (%s): %s \n",Console().Time(),str.c_str());
|
||||
}
|
||||
|
||||
PyObject * Exception::getPyDict() const
|
||||
PyObject * Exception::getPyObject(void) const
|
||||
{
|
||||
PyObject *edict = PyDict_New();
|
||||
|
||||
@@ -112,7 +112,7 @@ PyObject * Exception::getPyDict() const
|
||||
return edict;
|
||||
}
|
||||
|
||||
void Exception::setPyDict( PyObject * pydict)
|
||||
void Exception::setPyObject( PyObject * pydict)
|
||||
{
|
||||
if(pydict!=NULL) {
|
||||
PyObject *pystring;
|
||||
@@ -283,7 +283,7 @@ void FileException::ReportException (void) const
|
||||
Console().Error("Exception (%s): %s \n",Console().Time(),str.c_str());
|
||||
}
|
||||
|
||||
PyObject * FileException::getPyDict() const
|
||||
PyObject * FileException::getPyObject(void) const
|
||||
{
|
||||
PyObject *edict = PyDict_New();
|
||||
|
||||
@@ -298,7 +298,7 @@ PyObject * FileException::getPyDict() const
|
||||
return edict;
|
||||
}
|
||||
|
||||
void FileException::setPyDict( PyObject * pydict)
|
||||
void FileException::setPyObject( PyObject * pydict)
|
||||
{
|
||||
if(pydict!=NULL) {
|
||||
PyObject *pystring;
|
||||
|
||||
@@ -85,9 +85,9 @@ public:
|
||||
/// intended to use via macro for autofilling of debugging information
|
||||
inline void setDebugInformation(const std::string & file, const int line, const std::string & function);
|
||||
/// returns a Python dictionary containing the exception data
|
||||
virtual PyObject * getPyDict() const;
|
||||
virtual PyObject * getPyObject(void) const;
|
||||
/// returns sets the exception data from a Python dictionary
|
||||
virtual void setPyDict( PyObject * pydict);
|
||||
virtual void setPyObject( PyObject * pydict);
|
||||
|
||||
protected:
|
||||
public: // FIXME: Remove the public keyword
|
||||
@@ -193,9 +193,9 @@ public:
|
||||
/// Get file name for use with tranlatable message
|
||||
std::string getFileName() const;
|
||||
/// returns a Python dictionary containing the exception data
|
||||
virtual PyObject * getPyDict() const;
|
||||
virtual PyObject * getPyObject(void) const;
|
||||
/// returns sets the exception data from a Python dictionary
|
||||
virtual void setPyDict( PyObject * pydict);
|
||||
virtual void setPyObject( PyObject * pydict);
|
||||
protected:
|
||||
FileInfo file;
|
||||
// necesary for what() legacy behaviour as it returns a buffer that can not be of a temporary object to be destroyed at end of what()
|
||||
|
||||
@@ -80,7 +80,7 @@ public:
|
||||
{
|
||||
CLASS c;
|
||||
|
||||
c.setPyDict(pydict);
|
||||
c.setPyObject(pydict);
|
||||
|
||||
throw c;
|
||||
}
|
||||
|
||||
@@ -494,7 +494,7 @@ PyObject * @self.export.Name@::staticCallback_@i.Name@ (PyObject *self, PyObject
|
||||
}
|
||||
catch(const Base::Exception& e) // catch the FreeCAD exceptions
|
||||
{
|
||||
PyObject *edict = e.getPyDict();
|
||||
PyObject *edict = e.getPyObject();
|
||||
|
||||
e.ReportException();
|
||||
PyErr_SetObject(Base::BaseExceptionFreeCADError, edict);
|
||||
@@ -684,7 +684,7 @@ PyObject *@self.export.Name@::_getattr(char *attr) // __getattr__ function: n
|
||||
#ifndef DONT_CATCH_CXX_EXCEPTIONS
|
||||
catch(const Base::Exception& e) // catch the FreeCAD exceptions
|
||||
{
|
||||
PyObject *edict = e.getPyDict();
|
||||
PyObject *edict = e.getPyObject();
|
||||
|
||||
e.ReportException();
|
||||
PyErr_SetObject(Base::BaseExceptionFreeCADError, edict);
|
||||
@@ -714,7 +714,7 @@ PyObject *@self.export.Name@::_getattr(char *attr) // __getattr__ function: n
|
||||
#else // DONT_CATCH_CXX_EXCEPTIONS
|
||||
catch(const Base::Exception& e) // catch the FreeCAD exceptions
|
||||
{
|
||||
PyObject *edict = e.getPyDict();
|
||||
PyObject *edict = e.getPyObject();
|
||||
|
||||
e.ReportException();
|
||||
PyErr_SetObject(Base::BaseExceptionFreeCADError, edict);
|
||||
@@ -757,7 +757,7 @@ int @self.export.Name@::_setattr(char *attr, PyObject *value) // __setattr__ fun
|
||||
#ifndef DONT_CATCH_CXX_EXCEPTIONS
|
||||
catch(const Base::Exception& e) // catch the FreeCAD exceptions
|
||||
{
|
||||
PyObject *edict = e.getPyDict();
|
||||
PyObject *edict = e.getPyObject();
|
||||
|
||||
e.ReportException();
|
||||
PyErr_SetObject(Base::BaseExceptionFreeCADError, edict);
|
||||
@@ -788,7 +788,7 @@ int @self.export.Name@::_setattr(char *attr, PyObject *value) // __setattr__ fun
|
||||
#else // DONT_CATCH_CXX_EXCEPTIONS
|
||||
catch(const Base::Exception& e) // catch the FreeCAD exceptions
|
||||
{
|
||||
PyObject *edict = e.getPyDict();
|
||||
PyObject *edict = e.getPyObject();
|
||||
|
||||
e.ReportException();
|
||||
PyErr_SetObject(Base::BaseExceptionFreeCADError, edict);
|
||||
|
||||
Reference in New Issue
Block a user