Skip to content

Commit

Permalink
Catch generator errors
Browse files Browse the repository at this point in the history
  • Loading branch information
olofk committed Oct 2, 2024
1 parent 783b83c commit 3c02703
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion fusesoc/edalizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 3c02703

Please sign in to comment.