[geary/wip/795595-fix-special-folder-creation: 3/6] Make some exception messages more obvious when seen out of context
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/wip/795595-fix-special-folder-creation: 3/6] Make some exception messages more obvious when seen out of context
- Date: Wed, 26 Sep 2018 13:31:31 +0000 (UTC)
commit 1d0f0de987f3bfdb1d54ee83136de77e7eb9c2f2
Author: Michael Gratton <mike vee net>
Date: Wed Sep 26 23:20:00 2018 +1000
Make some exception messages more obvious when seen out of context
src/engine/imap-db/imap-db-account.vala | 4 +++-
src/engine/imap-engine/imap-engine-generic-account.vala | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/engine/imap-db/imap-db-account.vala b/src/engine/imap-db/imap-db-account.vala
index 28de8efc..02063e40 100644
--- a/src/engine/imap-db/imap-db-account.vala
+++ b/src/engine/imap-db/imap-db-account.vala
@@ -396,7 +396,9 @@ private class Geary.ImapDB.Account : BaseObject {
// XXX this should really be a db table constraint
Geary.ImapDB.Folder? folder = get_local_folder(path);
if (folder != null)
- throw new EngineError.ALREADY_EXISTS(path.to_string());
+ throw new EngineError.ALREADY_EXISTS(
+ "Folder with path already exists: %s", path.to_string()
+ );
yield db.exec_transaction_async(Db.TransactionType.RW, (cx) => {
// get the parent of this folder, creating parents if necessary ... ok if this fails,
diff --git a/src/engine/imap-engine/imap-engine-generic-account.vala
b/src/engine/imap-engine/imap-engine-generic-account.vala
index 6e7ec146..3edae386 100644
--- a/src/engine/imap-engine/imap-engine-generic-account.vala
+++ b/src/engine/imap-engine/imap-engine-generic-account.vala
@@ -442,7 +442,9 @@ private abstract class Geary.ImapEngine.GenericAccount : Geary.Account {
folder = this.folder_map.get(path);
if (folder == null) {
- throw new EngineError.NOT_FOUND(path.to_string());
+ throw new EngineError.NOT_FOUND(
+ "Folder not found: %s", path.to_string()
+ );
}
}
return folder;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]