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:
shaver%mozilla.org 2005-04-25 12:59:52 +00:00
Родитель d6f749a6fe
Коммит beddae0eba
1 изменённых файлов: 7 добавлений и 1 удалений

Просмотреть файл

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