Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
DeltaDaniel committed Jan 27, 2025
1 parent 2662c6c commit 9ef444f
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions src/ebd_toolchain/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,22 +185,22 @@ def handle_known_error(error: Exception, ebd_key: str) -> None:
if "puml" in export_types:
if not any(ebd_table.rows):
click.secho(f"EBD {ebd_key} has no ebd table; Skip puml creation!", fg="yellow")
continue
try:
puml_path = output_path / Path(f"{ebd_key}.puml")
_dump_puml(puml_path, ebd_graph)
click.secho(f"💾 Successfully exported '{ebd_key}.puml' to {puml_path.absolute()}")
except AssertionError as assertion_error:
# https://github.com/Hochfrequenz/rebdhuhn/issues/35
click.secho(str(assertion_error), fg="red")
except (
NotExactlyTwoOutgoingEdgesError,
GraphTooComplexForPlantumlError,
KrokiPlantUmlBadRequestError,
) as known_issue:
handle_known_error(known_issue, ebd_key)
except Exception as general_error: # pylint:disable=broad-exception-caught
click.secho(f"Error while exporting {ebd_key} as UML: {str(general_error)}; Skip!", fg="yellow")
else:
try:
puml_path = output_path / Path(f"{ebd_key}.puml")
_dump_puml(puml_path, ebd_graph)
click.secho(f"💾 Successfully exported '{ebd_key}.puml' to {puml_path.absolute()}")
except AssertionError as assertion_error:
# https://github.com/Hochfrequenz/rebdhuhn/issues/35
click.secho(str(assertion_error), fg="red")
except (
NotExactlyTwoOutgoingEdgesError,
GraphTooComplexForPlantumlError,
KrokiPlantUmlBadRequestError,
) as known_issue:
handle_known_error(known_issue, ebd_key)
except Exception as general_error: # pylint:disable=broad-exception-caught
click.secho(f"Error while exporting {ebd_key} as UML: {str(general_error)}; Skip!", fg="yellow")

try:
if "dot" in export_types:
Expand Down

0 comments on commit 9ef444f

Please sign in to comment.