]> gitweb.michael.orlitzky.com - mailshears.git/blobdiff - lib/mailshears/errors.rb
Restructure the lib directory to avoid name collisions.
[mailshears.git] / lib / mailshears / errors.rb
diff --git a/lib/mailshears/errors.rb b/lib/mailshears/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