Skip to content

Commit

Permalink
Catch OutcomeCodeAndFurtherStepError
Browse files Browse the repository at this point in the history
  • Loading branch information
DeltaDaniel committed Jan 29, 2025
1 parent 70742fe commit 24fd1a3
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/ebd_toolchain/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
GraphTooComplexForPlantumlError,
NotExactlyTwoOutgoingEdgesError,
OutcomeCodeAmbiguousError,
OutcomeCodeAndFurtherStepError,
PathsNotGreaterThanOneError,
)
from rebdhuhn.plantuml import convert_graph_to_plantuml
Expand Down Expand Up @@ -138,6 +139,7 @@ def handle_known_error(error: Exception, ebd_key: str) -> None:
error_sources[type(error)].append(ebd_key)

for ebd_key, (ebd_title, ebd_kapitel) in all_ebd_keys.items():
# for ebd_key, (ebd_title, ebd_kapitel) in {"E_0267": all_ebd_keys["E_0267"]}.items():
click.secho(f"Processing EBD {ebd_kapitel} '{ebd_key}' ({ebd_title})")
try:
docx_tables = get_ebd_docx_tables(docx_file_path=input_path, ebd_key=ebd_key)
Expand Down Expand Up @@ -178,7 +180,12 @@ def handle_known_error(error: Exception, ebd_key: str) -> None:
click.secho(f"💾 Successfully exported '{ebd_key}.json' to {json_path.absolute()}")
try:
ebd_graph = convert_table_to_graph(ebd_table)
except (EbdCrossReferenceNotSupportedError, EndeInWrongColumnError, OutcomeCodeAmbiguousError) as known_issue:
except (
EbdCrossReferenceNotSupportedError,
EndeInWrongColumnError,
OutcomeCodeAmbiguousError,
OutcomeCodeAndFurtherStepError,
) as known_issue:
handle_known_error(known_issue, ebd_key)
continue
except Exception as unknown_error: # pylint:disable=broad-except
Expand Down

0 comments on commit 24fd1a3

Please sign in to comment.