From 24fd1a376bdd9f043602c192ef58bf06dabdf000 Mon Sep 17 00:00:00 2001 From: DeltaDaniel <139119540+DeltaDaniel@users.noreply.github.com> Date: Wed, 29 Jan 2025 11:21:54 +0100 Subject: [PATCH] Catch OutcomeCodeAndFurtherStepError --- src/ebd_toolchain/main.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/ebd_toolchain/main.py b/src/ebd_toolchain/main.py index f4fa79d..a8b6eac 100644 --- a/src/ebd_toolchain/main.py +++ b/src/ebd_toolchain/main.py @@ -45,6 +45,7 @@ GraphTooComplexForPlantumlError, NotExactlyTwoOutgoingEdgesError, OutcomeCodeAmbiguousError, + OutcomeCodeAndFurtherStepError, PathsNotGreaterThanOneError, ) from rebdhuhn.plantuml import convert_graph_to_plantuml @@ -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) @@ -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