Fix some unhandled exception warnings

This commit is contained in:
Michael Gratton 2018-12-02 12:49:33 +11:00
parent fa5ecf0c22
commit 140ecc8839
2 changed files with 12 additions and 8 deletions

View file

@ -126,12 +126,16 @@ internal class Accounts.EditorServersPane : Gtk.Grid, EditorPane, AccountPane {
is_valid = yield validate(cancellable);
if (is_valid) {
has_changed = this.engine.update_account_service(
this.account, imap_mutable
);
has_changed = this.engine.update_account_service(
this.account, smtp_mutable
);
try {
has_changed = this.engine.update_account_service(
this.account, imap_mutable
);
has_changed = this.engine.update_account_service(
this.account, smtp_mutable
);
} catch (Geary.EngineError err) {
warning("Could not update account services: %s", err.message);
}
}
}

View file

@ -447,8 +447,8 @@ public class Geary.Engine : BaseObject {
* the configuration was the same.
*/
public bool update_account_service(AccountInformation account,
ServiceInformation updated) {
// Ensure account is closed.
ServiceInformation updated)
throws EngineError {
Account? impl = this.account_instances.get(account.id);
if (impl == null) {
throw new EngineError.BAD_PARAMETERS(