Blender Git Loki

Git Commits -> Revision 264c63e

Revision 264c63e by Campbell Barton (master)
September 15, 2011, 10:43 (GMT)
New C/Py api utility function PyC_Err_Format_Prefix() which raises an error with the existing error as a suffix.

Use this to raise errors when assigning a string property fails even though the value to assign *is* a string.


Before:
TypeError: bpy_struct: item.attr= val: Object.name expected a string type, not str


After:
TypeError: bpy_struct: item.attr= val: Object.name error assigning string, UnicodeEncodeError('utf-8' codec can't encode character 'udce9' in position 23: surrogates not allowed)

Commit Details:

Full Hash: 264c63ef03dceeac3ecd2177bbfd26391125a4b7
SVN Revision: 40217
Parent Commit: 5ba213a
Lines Changed: +60, -12

3 Modified Paths:

/source/blender/python/generic/py_capi_utils.c (+38, -0) (Diff)
/source/blender/python/generic/py_capi_utils.h (+1, -0) (Diff)
/source/blender/python/intern/bpy_rna.c (+21, -12) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021