summaryrefslogtreecommitdiff
path: root/src/buildstream/_frontend/app.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/buildstream/_frontend/app.py')
-rw-r--r--src/buildstream/_frontend/app.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/buildstream/_frontend/app.py b/src/buildstream/_frontend/app.py
index 09610851f..b3687911b 100644
--- a/src/buildstream/_frontend/app.py
+++ b/src/buildstream/_frontend/app.py
@@ -507,10 +507,13 @@ class App:
# Exception handler
#
- def _global_exception_handler(self, etype, value, tb):
+ def _global_exception_handler(self, etype, value, tb, exc=True):
# Print the regular BUG message
- formatted = "".join(traceback.format_exception(etype, value, tb))
+ formatted = None
+ if exc:
+ # Format the exception & traceback by default
+ formatted = "".join(traceback.format_exception(etype, value, tb))
self._message(MessageType.BUG, str(value), detail=formatted)
# If the scheduler has started, try to terminate all jobs gracefully,