From 3c027034e0726dbdeebf8a9b9b3c7d27fb21a4cf Mon Sep 17 00:00:00 2001 From: Olof Kindgren Date: Sat, 14 Sep 2024 09:53:30 +0200 Subject: [PATCH] Catch generator errors --- fusesoc/edalizer.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/fusesoc/edalizer.py b/fusesoc/edalizer.py index c7fc4212..4a2ddc81 100644 --- a/fusesoc/edalizer.py +++ b/fusesoc/edalizer.py @@ -163,7 +163,15 @@ def run_generators(self): self.work_root if not self.export_root else None, resolve_env_vars=self.resolve_env_vars, ) - for gen_core in _ttptttg.generate(): + try: + gen_cores = _ttptttg.generate() + except RuntimeError as e: + logger.error(e) + raise RuntimeError( + f"Failed to run generator '{ttptttg_data['name']}'" + ) + gen_cores = [] + for gen_core in gen_cores: core.direct_deps.append(str(gen_core.name)) gen_core.pos = _ttptttg.pos self._resolved_or_generated_cores.append(gen_core)