From 7e01e575fc24bcd36dedafff2067edb32ca4023e Mon Sep 17 00:00:00 2001 From: Henk Kalkwater Date: Thu, 25 Mar 2021 20:06:47 +0100 Subject: [PATCH] Fix crash on starup when syntax error in YAML --- source/watcher.d | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/watcher.d b/source/watcher.d index 79a4319..fff9b0f 100644 --- a/source/watcher.d +++ b/source/watcher.d @@ -21,7 +21,10 @@ void initPages(T, string sortPred)(ref T[string] array, ref T*[] sortedRange, co array[newPage.slug] = newPage; return true; } catch (page.ArticleParseException e) { - logf("Could not parse %s", path); + logf("Could not parse %s: %s", path, e); + return false; + } catch (Exception e) { + logf("Other exception while parsing %s: %s", path, e); return false; } }