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){
|
switch (change.type) with (DirectoryChangeType){
|
||||||
case added:
|
case added:
|
||||||
try {
|
try {
|
||||||
addPage(change.path.toString());
|
addPage(change.path.toString());
|
||||||
} catch(Exception e) {
|
} catch(Exception e) {
|
||||||
warningf("Error while updating %s: %s", change.path.toString(), e.msg);
|
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;
|
array[newPage.slug] = newPage;
|
||||||
} catch(page.ArticleParseException e) {
|
} catch(page.ArticleParseException e) {
|
||||||
warningf("Could not parse %s", change.path.toString());
|
warningf("Could not parse %s", change.path.toString());
|
||||||
|
} catch (Exception e) {
|
||||||
|
warningf("Error while updating %s: %s", change.path.toString(), e.msg);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case removed:
|
case removed:
|
||||||
|
|
Loading…
Reference in a new issue