Skip to contentSkip to conversation

cookerdata: Drop dubious exception handling code

PATCH New Richard Purdie 1 participant 1 message Feb 17, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cookerdata: Drop dubious exception handling code

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.

---
 lib/bb/cookerdata.py | 5 -----
 1 file changed, 5 deletions(-)
lib/bb/cookerdata.py +0 -5
index 2d52ce4c8f..dc498c205a 100644
@@ -294,14 +294,9 @@ class CookerDataBuilder(object):
                 bb.event.fire(bb.event.MultiConfigParsed(mcdata), self.data)
 
             self.data_hash = data_hash.hexdigest()
-        except (SyntaxError, bb.BBHandledException):
-            raise bb.BBHandledException()
         except bb.data_smart.ExpansionError as e:
             logger.error(str(e))
             raise bb.BBHandledException()
-        except Exception:
-            logger.exception("Error parsing configuration files")
-            raise bb.BBHandledException()
 
         bb.codeparser.update_module_dependencies(self.data)
 
Signature · 1 line
2.37.2