Fix crash when pages are updated and quickly removed

This commit is contained in:
Chris Josten 2020-10-03 21:50:43 +02:00
parent c958780e76
commit ed2926fb16
1 changed files with 3 additions and 1 deletions

View File

@ -64,7 +64,7 @@ void initPages(T, string sortPred)(ref T[string] array, ref T*[] sortedRange, co
switch (change.type) with (DirectoryChangeType){
case added:
try {
addPage(change.path.toString());
addPage(change.path.toString());
} catch(Exception e) {
warningf("Error while updating %s: %s", change.path.toString(), e.msg);
}
@ -90,6 +90,8 @@ void initPages(T, string sortPred)(ref T[string] array, ref T*[] sortedRange, co
array[newPage.slug] = newPage;
} catch(page.ArticleParseException e) {
warningf("Could not parse %s", change.path.toString());
} catch (Exception e) {
warningf("Error while updating %s: %s", change.path.toString(), e.msg);
}
break;
case removed: