Mercurial > kallithea
comparison rhodecode/lib/dbmigrate/migrate/exceptions.py @ 833:9753e0907827 beta
added dbmigrate package, added model changes
moved out upgrade db command to that package
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Sat, 11 Dec 2010 01:54:12 +0100 |
parents | |
children | 3bd2e94cbfc8 |
comparison
equal
deleted
inserted
replaced
832:634596f81cfd | 833:9753e0907827 |
---|---|
1 """ | |
2 Provide exception classes for :mod:`migrate` | |
3 """ | |
4 | |
5 | |
6 class Error(Exception): | |
7 """Error base class.""" | |
8 | |
9 | |
10 class ApiError(Error): | |
11 """Base class for API errors.""" | |
12 | |
13 | |
14 class KnownError(ApiError): | |
15 """A known error condition.""" | |
16 | |
17 | |
18 class UsageError(ApiError): | |
19 """A known error condition where help should be displayed.""" | |
20 | |
21 | |
22 class ControlledSchemaError(Error): | |
23 """Base class for controlled schema errors.""" | |
24 | |
25 | |
26 class InvalidVersionError(ControlledSchemaError): | |
27 """Invalid version number.""" | |
28 | |
29 | |
30 class DatabaseNotControlledError(ControlledSchemaError): | |
31 """Database should be under version control, but it's not.""" | |
32 | |
33 | |
34 class DatabaseAlreadyControlledError(ControlledSchemaError): | |
35 """Database shouldn't be under version control, but it is""" | |
36 | |
37 | |
38 class WrongRepositoryError(ControlledSchemaError): | |
39 """This database is under version control by another repository.""" | |
40 | |
41 | |
42 class NoSuchTableError(ControlledSchemaError): | |
43 """The table does not exist.""" | |
44 | |
45 | |
46 class PathError(Error): | |
47 """Base class for path errors.""" | |
48 | |
49 | |
50 class PathNotFoundError(PathError): | |
51 """A path with no file was required; found a file.""" | |
52 | |
53 | |
54 class PathFoundError(PathError): | |
55 """A path with a file was required; found no file.""" | |
56 | |
57 | |
58 class RepositoryError(Error): | |
59 """Base class for repository errors.""" | |
60 | |
61 | |
62 class InvalidRepositoryError(RepositoryError): | |
63 """Invalid repository error.""" | |
64 | |
65 | |
66 class ScriptError(Error): | |
67 """Base class for script errors.""" | |
68 | |
69 | |
70 class InvalidScriptError(ScriptError): | |
71 """Invalid script error.""" | |
72 | |
73 | |
74 class InvalidVersionError(Error): | |
75 """Invalid version error.""" | |
76 | |
77 # migrate.changeset | |
78 | |
79 class NotSupportedError(Error): | |
80 """Not supported error""" | |
81 | |
82 | |
83 class InvalidConstraintError(Error): | |
84 """Invalid constraint error""" | |
85 | |
86 class MigrateDeprecationWarning(DeprecationWarning): | |
87 """Warning for deprecated features in Migrate""" |