From 1e1e6f56d24a0cd6a3b270dc794374df6c3c832f Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Mon, 18 May 2020 14:23:58 -0400 Subject: catching --- src/doc_reform/spine.d | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/doc_reform/spine.d') diff --git a/src/doc_reform/spine.d b/src/doc_reform/spine.d index 409f460..6e03f3d 100755 --- a/src/doc_reform/spine.d +++ b/src/doc_reform/spine.d @@ -663,7 +663,15 @@ string program_name = "spine"; if (exists(sisudoc_txt_)) { import dyaml; try { - Node pod_manifest_yaml = Loader.fromFile(sisudoc_txt_).load(); + Node pod_manifest_yaml; + try { + pod_manifest_yaml = Loader.fromFile(sisudoc_txt_).load(); + } catch (ErrnoException ex) { + } catch (FileException ex) { + writeln("ERROR failed to read config file"); + } catch (Throwable) { + writeln("ERROR failed to read config file content, not parsed as yaml"); + } if ("doc" in pod_manifest_yaml) { if (pod_manifest_yaml["doc"].type.mapping && pod_manifest_yaml["doc"].tag.match(rgx.yaml_tag_is_map) -- cgit v1.2.3