X-Git-Url: http://gitweb.michael.orlitzky.com/?p=mailshears.git;a=blobdiff_plain;f=lib%2Fcommon%2Ferrors.rb;h=6a9927af8070e561e21896c85ad7073ff00fb32e;hp=3607b8527d772fbb4fcf79f6062f21bb08accd9c;hb=20b843bddcd73833d41f98ff79d92ef59bb4d81e;hpb=c6cab6b71770d14dad1115db90a00b990c44a58d diff --git a/lib/common/errors.rb b/lib/common/errors.rb index 3607b85..6a9927a 100644 --- a/lib/common/errors.rb +++ b/lib/common/errors.rb @@ -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 account name is -# invalid. -class InvalidAccountError < StandardError +# Domain is syntactically invalid. +class InvalidDomainError < StandardError end -# Used to indicate that an account does not exist on the filesystem. -class NonexistentAccountError < StandardError +# 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