Bug 1699303 - Catch potential exception in discoverFolders. r=frg

This commit is contained in:
Ian Neal 2021-03-17 22:29:57 +00:00
Родитель a1785d6eea
Коммит 7639060d45
1 изменённых файлов: 11 добавлений и 2 удалений

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

@ -23,8 +23,17 @@ var MailUtils =
*/
discoverFolders: function MailUtils_discoverFolders()
{
for (let server of MailServices.accounts.allServers)
server.rootFolder.subFolders;
for (let server of MailServices.accounts.allServers) {
// Bug 466311 Sometimes this can throw file not found, we're unsure
// why, but catch it and log the fact.
try {
server.rootFolder.subFolders;
}
catch (ex) {
Services.console.logStringMessage("Discovering folders for account failed with " +
"exception: " + ex);
}
}
},
/**