Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <campbell@blender.org>2022-04-06 09:15:11 +0300
committerFabian Schempp <fabianschempp@googlemail.com>2022-04-11 01:31:58 +0300
commit006bc7104325b4323d61389a8ac9037e5401ae2e (patch)
tree9f7dbf4015493206c50294c0b2f5a72e72845163 /source/blender/editors/space_text
parentd99e0abda0d171a7ac69410c5a605ac12a4257b4 (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')
-rw-r--r--source/blender/editors/space_text/text_ops.c4
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