X-Git-Url: http://gitweb.michael.orlitzky.com/?p=mailshears.git;a=blobdiff_plain;f=lib%2Fcommon%2Ferrors.rb;h=7a2fbba565c035c7584972c3de211b0acf4ce4d2;hp=d0bcfe200ef14c187c29ac6bfe26ba8cb3be0be6;hb=f819b178c5c1cb8adda0182c610e5c52fad8bea7;hpb=72696d3f6e95ef773af9727e9c3459b9038b0fc2 diff --git a/lib/common/errors.rb b/lib/common/errors.rb index d0bcfe2..7a2fbba 100644 --- a/lib/common/errors.rb +++ b/lib/common/errors.rb @@ -4,17 +4,24 @@ class DatabaseError < StandardError end -# Perhaps surprisingly, used to indicate that an user name is -# invalid. +# Username is syntactically invalid. class InvalidUserError < StandardError end +# 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