diff options
author | Daniel Bailey <danieljabailey> | 2020-08-06 08:34:55 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-08-06 08:44:00 +0300 |
commit | e9c4325515aed9cb3a35183d4093cda2b6bffd9f (patch) | |
tree | f68c4d89f16257731ff7457371978b973da3f8a3 /source/blender/python/intern/bpy_interface.c | |
parent | c5b6b3d82f56b6da1fce19b961fa444745dbc269 (diff) |
Python: include Python stack trace in the crash log
This helps Python developers troubleshoot errors when
Python causes a crash.
Diffstat (limited to 'source/blender/python/intern/bpy_interface.c')
-rw-r--r-- | source/blender/python/intern/bpy_interface.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/python/intern/bpy_interface.c b/source/blender/python/intern/bpy_interface.c index a880d2cd285..dfddbc047f9 100644 --- a/source/blender/python/intern/bpy_interface.c +++ b/source/blender/python/intern/bpy_interface.c @@ -436,6 +436,12 @@ static void python_script_error_jump_text(struct Text *text) } } +void BPY_python_backtrace(FILE *fp) +{ + fputs("\n# Python backtrace\n", fp); + PyC_StackPrint(fp); +} + /* super annoying, undo _PyModule_Clear(), bug [#23871] */ #define PYMODULE_CLEAR_WORKAROUND |