archive mirror
 help / color / mirror / Atom feed
From: Martin Jansa <>
Cc:, Richard Purdie <>
Subject: [2.2][PATCH 4/4] cookerdata: Drop dubious exception handling code
Date: Fri, 10 Mar 2023 21:45:19 +0100	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

From: Richard Purdie <>

This code appears to be dangerous, it swallows exceptions, turning them into
"handled" versions which then show no errors to the user. This is a pretty
poor user experience and I can't see why this code should be swallowing
such things. Drop the worst bits of code.

Signed-off-by: Richard Purdie <>
 lib/bb/ | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/lib/bb/ b/lib/bb/
index 25eea827d..b4bfba335 100644
--- a/lib/bb/
+++ b/lib/bb/
@@ -294,14 +294,9 @@ class CookerDataBuilder(object):
             self.data_hash = data_hash.hexdigest()
-        except (SyntaxError, bb.BBHandledException):
-            raise bb.BBHandledException()
         except bb.data_smart.ExpansionError as e:
             raise bb.BBHandledException()
-        except Exception:
-            logger.exception("Error parsing configuration files")
-            raise bb.BBHandledException()
         # Handle obsolete variable names

      parent reply	other threads:[~2023-03-10 20:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-10 20:45 [2.2][PATCH 1/4] utils: Allow to_boolean to support int values Martin Jansa
2023-03-10 20:45 ` [2.2][PATCH 2/4] cookerdata: Remove incorrect SystemExit usage Martin Jansa
2023-03-10 20:45 ` [2.2][PATCH 3/4] cookerdata: Improve early exception handling Martin Jansa
2023-03-10 20:45 ` Martin Jansa [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).