]> gitweb.michael.orlitzky.com - mailshears.git/blobdiff - lib/common/errors.rb
Factor out common code that can be used to mv (rename) accounts.
[mailshears.git] / lib / common / errors.rb
diff --git a/lib/common/errors.rb b/lib/common/errors.rb
new file mode 100644 (file)
index 0000000..3607b85
--- /dev/null
@@ -0,0 +1,20 @@
+# A generalization of PGError, and whatever MySQL and the other
+# databases might eventually use.
+class DatabaseError < StandardError
+end
+
+
+# Perhaps surprisingly, used to indicate that an account name is
+# invalid.
+class InvalidAccountError < StandardError
+end
+
+
+# Used to indicate that an account does not exist on the filesystem.
+class NonexistentAccountError < StandardError
+end
+
+
+# Used to indicate that a domain does not exist on the filesystem.
+class NonexistentDomainError < StandardError
+end