diff --git a/janis_core/ingestion/fromwdl.py b/janis_core/ingestion/fromwdl.py index 80c466497..db4d736a5 100755 --- a/janis_core/ingestion/fromwdl.py +++ b/janis_core/ingestion/fromwdl.py @@ -3,6 +3,7 @@ import os import re from types import LambdaType + from typing import List, Union, Optional, Callable import WDL @@ -447,6 +448,16 @@ def parse_command_tool_output(self, outp: WDL.Decl): toolname = sys.argv[1] - tool = WdlParser.from_doc(toolname) - - tool.translate("janis") + try: + tool = WdlParser.from_doc(toolname) + tool.translate("janis") + + except WDL.Error.MultipleValidationErrors as err: + for exc in err.exceptions: + print(exc, file=sys.stderr) + print(exc.pos, file=sys.stderr) + print(exc.node, file=sys.stderr) + except WDL.Error.ValidationError as exc: + print(exc, file=sys.stderr) + print(exc.pos, file=sys.stderr) + print(exc.node, file=sys.stderr)