diff mbox series

Revert "bitbake-setup: catch unexpected exceptions and show a clean error message"

Message ID 20261112141920.3340431-1-richard.purdie@linuxfoundation.org
State New
Headers show
Series Revert "bitbake-setup: catch unexpected exceptions and show a clean error message" | expand

Commit Message

Richard Purdie Nov. 12, 2026, 2:19 p.m. UTC
This reverts commit 9fb6b0011bae34a7c1feb53281e13364d85ddee8.

When things fail, having a traceback is helpful and we're seeing cases such
as exceptions within exceptions where it is hard to tell why things are breaking.

I'd rather have debug data than not. Asking the user to rerun with --debug is hard
for example in CI and isn't how we do things in other areas.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 bin/bitbake-setup | 20 ++++++--------------
 1 file changed, 6 insertions(+), 14 deletions(-)
diff mbox series

Patch

diff --git a/bin/bitbake-setup b/bin/bitbake-setup
index 02a7257a515..27c7da146b6 100755
--- a/bin/bitbake-setup
+++ b/bin/bitbake-setup
@@ -1458,21 +1458,13 @@  def main():
 
         logger.info('Bitbake-setup is using {} as top directory.'.format(top_dir))
 
-        try:
-            if args.func == init_config:
-                init_config(top_dir, all_settings, args)
-            else:
-                d = init_bb_cache(top_dir, all_settings, args)
-                args.func(top_dir, all_settings, args, d)
+        if args.func == init_config:
+            init_config(top_dir, all_settings, args)
+        else:
+            d = init_bb_cache(top_dir, all_settings, args)
+            args.func(top_dir, all_settings, args, d)
 
-            save_bb_cache()
-        except (SystemExit, KeyboardInterrupt):
-            raise
-        except Exception as e:
-            if args.debug:
-                raise
-            logger.error(str(e))
-            sys.exit(1)
+        save_bb_cache()
     else:
         parser.print_help()