Fix crash on starup when syntax error in YAML

This commit is contained in:
Chris Josten 2021-03-25 20:06:47 +01:00
parent 46b5cfdbb5
commit 7e01e575fc
1 changed files with 4 additions and 1 deletions

View File

@ -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;
}
}