summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2020-08-04 15:54:18 +0200
committerJürg Billeter <j@bitron.ch>2020-08-06 07:10:28 +0200
commit78aa20382a1e1ad87d3d552ca65f0c4da76a15c2 (patch)
tree3d1dd321ff013efa813dff6d35a162f873e41713
parent981ad3697a9197da38f2ec4a867096d7a1ad144c (diff)
downloadbuildstream-78aa20382a1e1ad87d3d552ca65f0c4da76a15c2.tar.gz
_frontend/app.py: Catch exceptions in `_print_summary()`
`_print_summary()` is called outside a `try` block in `initialized()` to print a summary at the end of a session. Add a `try` block to properly handle plugin errors from `show_pipeline()`. This provides error handling consistency with `print_heading()`, which is called at the start of a session.
-rw-r--r--src/buildstream/_frontend/app.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/buildstream/_frontend/app.py b/src/buildstream/_frontend/app.py
index 3160e8b1e..5d49e9612 100644
--- a/src/buildstream/_frontend/app.py
+++ b/src/buildstream/_frontend/app.py
@@ -747,7 +747,11 @@ class App:
# Ensure all status & messages have been processed
self._render(message_text=self._message_text)
click.echo("", err=True)
- self.logger.print_summary(self.stream, self._main_options["log_file"])
+
+ try:
+ self.logger.print_summary(self.stream, self._main_options["log_file"])
+ except BstError as e:
+ self._error_exit(e)
# _error_exit()
#