]> gitweb.michael.orlitzky.com - mailshears.git/blobdiff - lib/common/errors.rb
Make "postfixadmin" the only default plugin and make dovecot_mail_root safer.
[mailshears.git] / lib / common / errors.rb
index 3607b8527d772fbb4fcf79f6062f21bb08accd9c..7e2bd505ed9a5ffb888fa7cb2cf7f048dc7d3a5d 100644 (file)
@@ -1,20 +1,15 @@
-# A generalization of PGError, and whatever MySQL and the other
-# databases might eventually use.
-class DatabaseError < StandardError
-end
+# An error indicating that a username is syntactically invalid.
+class InvalidUserError < StandardError; end
 
+# An error indicating that a domain is syntactically invalid.
+class InvalidDomainError < StandardError; end
 
-# Perhaps surprisingly, used to indicate that an account name is
-# invalid.
-class InvalidAccountError < StandardError
-end
+# An error indicating that a user does not exist.
+class NonexistentUserError < StandardError; end
 
+# An error indicating that a domain does not exist.
+class NonexistentDomainError < 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
+# An error indicating that some user already exists. For example, if
+# one tries to rename a user and the destination user already exists.
+class UserAlreadyExistsError < StandardError; end