diff options
author | Grant Cox <grant.cox@deepspaceamps.com> | 2019-12-18 08:59:53 -0600 |
---|---|---|
committer | Marcus Müller <marcus@hostalia.de> | 2019-12-19 18:50:58 +0100 |
commit | c24b15b48dbf0487ae8f8d4fc1c2570a23b6b28c (patch) | |
tree | 49d695c6bdb922c13480cadb20f4094f7f98e17e /grc/core/Messages.py | |
parent | 3918935810ffdede5bc564ee0854f9cc6293289f (diff) |
grc: add send_flowgraph_error_report to Messages
add method to the Messages module to print flowgraph
errors in a verbose format
Diffstat (limited to 'grc/core/Messages.py')
-rw-r--r-- | grc/core/Messages.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/grc/core/Messages.py b/grc/core/Messages.py index 6d67dc7d2e..df7084996d 100644 --- a/grc/core/Messages.py +++ b/grc/core/Messages.py @@ -143,3 +143,17 @@ def send_fail_save_preferences(prefs_file_path): def send_warning(warning): send('>>> Warning: %s\n' % warning) + + +def send_flowgraph_error_report(flowgraph): + """ verbose error report for flowgraphs """ + error_list = flowgraph.get_error_messages() + if not error_list: + return + + send('*' * 50 + '\n') + summary_msg = '{} errors from flowgraph:\n'.format(len(error_list)) + send(summary_msg) + for err in error_list: + send(err) + send('\n' + '*' * 50 + '\n') |