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-03-12 18:18:08 +0300
committerCampbell Barton <ideasman42@gmail.com>2011-03-12 18:18:08 +0300
commit90d42e114c2b8828e84a5e229da0de0a23ec0a83 (patch)
tree0c80b5f1214cfba5422f0b587b116e66c7a5c0af /source/blender/python/intern/bpy_util.c
parenta5e59ede6e275d89fb74ab2e2ae1ee581e08356b (diff)
py/rna: BPy_reports_to_error() now takes the exception type as an argument and returns -1 as an error value
Diffstat (limited to 'source/blender/python/intern/bpy_util.c')
-rw-r--r--source/blender/python/intern/bpy_util.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/python/intern/bpy_util.c b/source/blender/python/intern/bpy_util.c
index 3d5090b73fa..ccbee2abcd1 100644
--- a/source/blender/python/intern/bpy_util.c
+++ b/source/blender/python/intern/bpy_util.c
@@ -57,7 +57,7 @@ char *BPy_enum_as_string(EnumPropertyItem *item)
return cstring;
}
-short BPy_reports_to_error(ReportList *reports, const short clear)
+short BPy_reports_to_error(ReportList *reports, PyObject *exception, const short clear)
{
char *report_str;
@@ -68,11 +68,11 @@ short BPy_reports_to_error(ReportList *reports, const short clear)
}
if(report_str) {
- PyErr_SetString(PyExc_RuntimeError, report_str);
+ PyErr_SetString(exception, report_str);
MEM_freeN(report_str);
}
- return (report_str != NULL);
+ return (report_str == NULL) ? 0 : -1;
}