mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 22:32:46 +00:00
wrap pref calls with try / catch.
This commit is contained in:
parent
f127b5bcec
commit
9ce5fc5dd5
@ -72,8 +72,19 @@ function InitEditCard()
|
||||
// get specific prefs that editCard will need
|
||||
if ( prefs )
|
||||
{
|
||||
editCard.displayLastNameFirst = prefs.GetBoolPref("mail.addr_book.lastnamefirst");
|
||||
editCard.generateDisplayName = prefs.GetBoolPref("mail.addr_book.displayName.autoGeneration");
|
||||
try {
|
||||
editCard.displayLastNameFirst = prefs.GetBoolPref("mail.addr_book.lastnamefirst");
|
||||
}
|
||||
catch (ex) {
|
||||
dump("failed to get the mail.addr_book.lastnamefirst pref\n");
|
||||
}
|
||||
|
||||
try {
|
||||
editCard.generateDisplayName = prefs.GetBoolPref("mail.addr_book.displayName.autoGeneration");
|
||||
}
|
||||
catch (ex) {
|
||||
dump("failed to get the mail.addr_book.displayName.autoGeneration pref\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user