Fix crash when pages are updated and quickly removed
This commit is contained in:
parent
c958780e76
commit
ed2926fb16
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue