mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 00:01:50 +00:00
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:
parent
4681a7723b
commit
2d5ba6cf4e
@ -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]);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user