summaryrefslogtreecommitdiff
path: root/alot/db/errors.py
diff options
context:
space:
mode:
authorPatrick Totzke <patricktotzke@gmail.com>2012-03-11 16:40:12 +0000
committerPatrick Totzke <patricktotzke@gmail.com>2012-03-11 16:40:12 +0000
commit90f57a7d6e488a196bd800d87314af986c1f4ccc (patch)
tree71633857a18311ba2f54cefec264d23cc01bda3d /alot/db/errors.py
parent657b7525f297c885877281861dba90da5301db25 (diff)
refacor: move db errors to separate file
Diffstat (limited to 'alot/db/errors.py')
-rw-r--r--alot/db/errors.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/alot/db/errors.py b/alot/db/errors.py
new file mode 100644
index 00000000..17ef219c
--- /dev/null
+++ b/alot/db/errors.py
@@ -0,0 +1,19 @@
+class DatabaseError(Exception):
+ pass
+
+
+class DatabaseROError(DatabaseError):
+ """cannot write to read-only database"""
+ pass
+
+
+class DatabaseLockedError(DatabaseError):
+ """cannot write to locked index"""
+ pass
+
+
+class NonexistantObjectError(DatabaseError):
+ """requested thread or message does not exist in the index"""
+ pass
+
+