Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-02-18 09:04:05 +0300
committerCampbell Barton <ideasman42@gmail.com>2011-02-18 09:04:05 +0300
commit6524d274625d920d5711b7f2d324904af787188a (patch)
treecf8d8da05d50d8f3a3d4a89cc2527bd81ab06f87 /source/gameengine/Expressions/PyObjectPlus.h
parent1dc4db7775f0a7a078aa32f44d51cd495528ec4d (diff)
py api was raising SystemError exception incorrectly, this is intended for internal interpreter problems.
Replace most with RuntimeError.
Diffstat (limited to 'source/gameengine/Expressions/PyObjectPlus.h')
-rw-r--r--source/gameengine/Expressions/PyObjectPlus.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/source/gameengine/Expressions/PyObjectPlus.h b/source/gameengine/Expressions/PyObjectPlus.h
index d69be6af5e5..4890a5edb04 100644
--- a/source/gameengine/Expressions/PyObjectPlus.h
+++ b/source/gameengine/Expressions/PyObjectPlus.h
@@ -169,35 +169,35 @@ typedef struct PyObjectPlus_Proxy {
#define KX_PYMETHOD(class_name, method_name) \
PyObject* Py##method_name(PyObject* args, PyObject* kwds); \
static PyObject* sPy##method_name( PyObject* self, PyObject* args, PyObject* kwds) { \
- if(BGE_PROXY_REF(self)==NULL) { PyErr_SetString(PyExc_SystemError, #class_name "." #method_name "() - " BGE_PROXY_ERROR_MSG); return NULL; } \
+ if(BGE_PROXY_REF(self)==NULL) { PyErr_SetString(PyExc_RuntimeError, #class_name "." #method_name "() - " BGE_PROXY_ERROR_MSG); return NULL; } \
return ((class_name*)BGE_PROXY_REF(self))->Py##method_name(args, kwds); \
}; \
#define KX_PYMETHOD_VARARGS(class_name, method_name) \
PyObject* Py##method_name(PyObject* args); \
static PyObject* sPy##method_name( PyObject* self, PyObject* args) { \
- if(BGE_PROXY_REF(self)==NULL) { PyErr_SetString(PyExc_SystemError, #class_name "." #method_name "() - " BGE_PROXY_ERROR_MSG); return NULL; } \
+ if(BGE_PROXY_REF(self)==NULL) { PyErr_SetString(PyExc_RuntimeError, #class_name "." #method_name "() - " BGE_PROXY_ERROR_MSG); return NULL; } \
return ((class_name*)BGE_PROXY_REF(self))->Py##method_name(args); \
}; \
#define KX_PYMETHOD_NOARGS(class_name, method_name) \
PyObject* Py##method_name(); \
static PyObject* sPy##method_name( PyObject* self) { \
- if(BGE_PROXY_REF(self)==NULL) { PyErr_SetString(PyExc_SystemError, #class_name "." #method_name "() - " BGE_PROXY_ERROR_MSG); return NULL; } \
+ if(BGE_PROXY_REF(self)==NULL) { PyErr_SetString(PyExc_RuntimeError, #class_name "." #method_name "() - " BGE_PROXY_ERROR_MSG); return NULL; } \
return ((class_name*)BGE_PROXY_REF(self))->Py##method_name(); \
}; \
#define KX_PYMETHOD_O(class_name, method_name) \
PyObject* Py##method_name(PyObject* value); \
static PyObject* sPy##method_name( PyObject* self, PyObject* value) { \
- if(BGE_PROXY_REF(self)==NULL) { PyErr_SetString(PyExc_SystemError, #class_name "." #method_name "(value) - " BGE_PROXY_ERROR_MSG); return NULL; } \
+ if(BGE_PROXY_REF(self)==NULL) { PyErr_SetString(PyExc_RuntimeError, #class_name "." #method_name "(value) - " BGE_PROXY_ERROR_MSG); return NULL; } \
return ((class_name*)BGE_PROXY_REF(self))->Py##method_name(value); \
}; \
#define KX_PYMETHOD_DOC(class_name, method_name) \
PyObject* Py##method_name(PyObject* args, PyObject* kwds); \
static PyObject* sPy##method_name( PyObject* self, PyObject* args, PyObject* kwds) { \
- if(BGE_PROXY_REF(self)==NULL) { PyErr_SetString(PyExc_SystemError, #class_name "." #method_name "(...) - " BGE_PROXY_ERROR_MSG); return NULL; } \
+ if(BGE_PROXY_REF(self)==NULL) { PyErr_SetString(PyExc_RuntimeError, #class_name "." #method_name "(...) - " BGE_PROXY_ERROR_MSG); return NULL; } \
return ((class_name*)BGE_PROXY_REF(self))->Py##method_name(args, kwds); \
}; \
static const char method_name##_doc[]; \
@@ -205,7 +205,7 @@ typedef struct PyObjectPlus_Proxy {
#define KX_PYMETHOD_DOC_VARARGS(class_name, method_name) \
PyObject* Py##method_name(PyObject* args); \
static PyObject* sPy##method_name( PyObject* self, PyObject* args) { \
- if(BGE_PROXY_REF(self)==NULL) { PyErr_SetString(PyExc_SystemError, #class_name "." #method_name "(...) - " BGE_PROXY_ERROR_MSG); return NULL; } \
+ if(BGE_PROXY_REF(self)==NULL) { PyErr_SetString(PyExc_RuntimeError, #class_name "." #method_name "(...) - " BGE_PROXY_ERROR_MSG); return NULL; } \
return ((class_name*)BGE_PROXY_REF(self))->Py##method_name(args); \
}; \
static const char method_name##_doc[]; \
@@ -213,7 +213,7 @@ typedef struct PyObjectPlus_Proxy {
#define KX_PYMETHOD_DOC_O(class_name, method_name) \
PyObject* Py##method_name(PyObject* value); \
static PyObject* sPy##method_name( PyObject* self, PyObject* value) { \
- if(BGE_PROXY_REF(self)==NULL) { PyErr_SetString(PyExc_SystemError, #class_name "." #method_name "(value) - " BGE_PROXY_ERROR_MSG); return NULL; } \
+ if(BGE_PROXY_REF(self)==NULL) { PyErr_SetString(PyExc_RuntimeError, #class_name "." #method_name "(value) - " BGE_PROXY_ERROR_MSG); return NULL; } \
return ((class_name*)BGE_PROXY_REF(self))->Py##method_name(value); \
}; \
static const char method_name##_doc[]; \
@@ -221,7 +221,7 @@ typedef struct PyObjectPlus_Proxy {
#define KX_PYMETHOD_DOC_NOARGS(class_name, method_name) \
PyObject* Py##method_name(); \
static PyObject* sPy##method_name( PyObject* self) { \
- if(BGE_PROXY_REF(self)==NULL) { PyErr_SetString(PyExc_SystemError, #class_name "." #method_name "() - " BGE_PROXY_ERROR_MSG); return NULL; } \
+ if(BGE_PROXY_REF(self)==NULL) { PyErr_SetString(PyExc_RuntimeError, #class_name "." #method_name "() - " BGE_PROXY_ERROR_MSG); return NULL; } \
return ((class_name*)BGE_PROXY_REF(self))->Py##method_name(); \
}; \
static const char method_name##_doc[]; \