PyRNA: include class name in double-register exception
Helps debugging errors when classes are registered twice.
This commit is contained in:
@@ -8557,9 +8557,10 @@ static PyObject *pyrna_register_class(PyObject *UNUSED(self), PyObject *py_class
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (PyDict_GetItem(((PyTypeObject *)py_class)->tp_dict, bpy_intern_str_bl_rna)) {
|
if (PyDict_GetItem(((PyTypeObject *)py_class)->tp_dict, bpy_intern_str_bl_rna)) {
|
||||||
PyErr_SetString(PyExc_ValueError,
|
PyErr_Format(PyExc_ValueError,
|
||||||
"register_class(...): "
|
"register_class(...): "
|
||||||
"already registered as a subclass");
|
"already registered as a subclass '%.200s'",
|
||||||
|
((PyTypeObject *)py_class)->tp_name);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user