diff options
author | Campbell Barton <campbell@blender.org> | 2022-04-06 09:15:11 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-04-06 11:02:58 +0300 |
commit | 2d2baeaf04d481f284bc2f098fb6d7ee9268151f (patch) | |
tree | dee60d7075b6febe402323d5b12085bdff544630 /source/blender/editors/space_text/text_ops.c | |
parent | e4f71e5ef345070dc0b21df35a049184d3e46645 (diff) |
Fix: T78228 Send all python errors to info editor
Python exceptions are now shown in the info editor,
this also resolves an old bug where errors were printed twice.
This was originally based on D9752 by @ShadowChaser although many
changes have been made from the original patch.
Details:
- BPy_errors_to_report no longer prints additional output.
- BKE_report_print_test was added so it's possible to check if calling
BKE_report also printed to the stdout.
- Callers to BPy_errors_to_report are responsible for ensuring output
is printed to the stdout/stderr.
- Python exceptions no longer add a trailing newline,
needed to avoid blank-space when displayed in the info-editor.
Diffstat (limited to 'source/blender/editors/space_text/text_ops.c')
-rw-r--r-- | source/blender/editors/space_text/text_ops.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c index 49c0236866d..d4aac8dd57f 100644 --- a/source/blender/editors/space_text/text_ops.c +++ b/source/blender/editors/space_text/text_ops.c @@ -788,9 +788,7 @@ static int text_run_script(bContext *C, ReportList *reports) } } - BKE_report( - reports, RPT_ERROR, "Python script failed, check the message in the system console"); - + /* No need to report the error, this has already been handled by #BPY_run_text. */ return OPERATOR_FINISHED; } #else |