Overhaul everything to get consistent error reports.
[mailshears.git] / lib / common / errors.rb
1 # A generalization of PGError, and whatever MySQL and the other
2 # databases might eventually use.
3 class DatabaseError < StandardError
4 end
5
6
7 # Username is syntactically invalid.
8 class InvalidUserError < StandardError
9 end
10
11 # Domain is syntactically invalid.
12 class InvalidDomainError < StandardError
13 end
14
15
16 # Used to indicate that an user does not exist.
17 class NonexistentUserError < StandardError
18 end
19
20 # Used to indicate that a domain does not exist.
21 class NonexistentDomainError < StandardError
22 end
23
24
25 # When you try to rename a user on top of one that already exists.
26 class UserAlreadyExistsError < StandardError
27 end