If we can't create a calendar instance, perhaps because of a bogus id or uri,
just skip the calendar in question, rather than failing to get any calendars. (Still to do: figure out exactly how we get into this state in the current code.) NPOTB.
This commit is contained in:
Родитель
d6f749a6fe
Коммит
beddae0eba
|
@ -203,7 +203,13 @@ calCalendarManager.prototype = {
|
|||
while (stmt.step()) {
|
||||
var id = stmt.row.id;
|
||||
if (!this.mCache[id]) {
|
||||
this.mCache[id] = this.createCalendar(stmt.row.name, stmt.row.type, makeURI(stmt.row.uri));
|
||||
try {
|
||||
this.mCache[id] = this.createCalendar(stmt.row.name, stmt.row.type, makeURI(stmt.row.uri));
|
||||
} catch (e) {
|
||||
dump("Can't create calendar for " + id + " (" + stmt.row.name + ", " + stmt.row.type + ", " +
|
||||
stmt.row.uri + "): " + e.toString + "\n");
|
||||
continue;
|
||||
}
|
||||
}
|
||||
calendars.push(this.mCache[id]);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче