diff options
author | Campbell Barton <campbell@blender.org> | 2022-05-03 10:54:37 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-05-03 11:22:54 +0300 |
commit | 74dfb7ca23b73b714b73bfaf3553d05fbbc2a29c (patch) | |
tree | 9325eafff8b5771183b2d31dc388be6e8106bb61 /source/blender/python/intern/bpy_props.c | |
parent | a821a2db3d5e4c5a302de677a127a662942c46ae (diff) |
Fix T97731: Python traceback no longer includes line-numbers
Regression caused by [0] that caused the error message to be
created based on a normalized exception (which hid line numbers).
PyC_ExceptionBuffer{_Simple} & BPy_errors_to_report
no longer clears the exception.
This could have been resolved by changing python_script_error_jump
however that would involve changes to reference counting that are more
risky (noted in code-comment).
[0]: 2d2baeaf04d481f284bc2f098fb6d7ee9268151f
Diffstat (limited to 'source/blender/python/intern/bpy_props.c')
-rw-r--r-- | source/blender/python/intern/bpy_props.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/python/intern/bpy_props.c b/source/blender/python/intern/bpy_props.c index 893ea90a235..a6aa1f46b0c 100644 --- a/source/blender/python/intern/bpy_props.c +++ b/source/blender/python/intern/bpy_props.c @@ -4111,6 +4111,8 @@ StructRNA *pointer_type_from_py(PyObject *value, const char *error_prefix) if (PyErr_Occurred()) { PyObject *msg = PyC_ExceptionBuffer(); const char *msg_char = PyUnicode_AsUTF8(msg); + PyErr_Clear(); + PyErr_Format( PyExc_TypeError, "%.200s expected an RNA type, failed with: %s", error_prefix, msg_char); Py_DECREF(msg); |