]> gitweb.michael.orlitzky.com - mailshears.git/blobdiff - lib/common/errors.rb
Stop pretending that we'll ever work with another DBMS.
[mailshears.git] / lib / common / errors.rb
index d0bcfe200ef14c187c29ac6bfe26ba8cb3be0be6..6a9927af8070e561e21896c85ad7073ff00fb32e 100644 (file)
@@ -1,20 +1,21 @@
-# A generalization of PGError, and whatever MySQL and the other
-# databases might eventually use.
-class DatabaseError < StandardError
+# Username is syntactically invalid.
+class InvalidUserError < StandardError
 end
 
-
-# Perhaps surprisingly, used to indicate that an user name is
-# invalid.
-class InvalidUserError < StandardError
+# Domain is syntactically invalid.
+class InvalidDomainError < StandardError
 end
 
 
-# Used to indicate that an user does not exist on the filesystem.
+# Used to indicate that an user does not exist.
 class NonexistentUserError < StandardError
 end
 
-
-# Used to indicate that a domain does not exist on the filesystem.
+# Used to indicate that a domain does not exist.
 class NonexistentDomainError < StandardError
 end
+
+
+# When you try to rename a user on top of one that already exists.
+class UserAlreadyExistsError < StandardError
+end