11class GitModelError (Exception ):
22 """A base exception for other gitmodel-related errors."""
3+
34 pass
45
56
67class ConfigurationError (GitModelError ):
78 """Raised during configuration errors"""
9+
810 pass
911
1012
1113class UnsupportedFormat (GitModelError ):
1214 """
1315 Raised when an unsupported serialization format is requested.
1416 """
17+
1518 pass
1619
1720
1821class FieldError (GitModelError ):
1922 """
2023 Raised when there is a configuration error with a ``Field``.
2124 """
25+
2226 pass
2327
2428
2529class DoesNotExist (GitModelError ):
2630 """
2731 Raised when the object in question can't be found.
2832 """
33+
2934 pass
3035
3136
3237class RepositoryError (GitModelError ):
3338 """
3439 Raises during an error while operating with the repository
3540 """
41+
3642 pass
3743
3844
@@ -46,13 +52,14 @@ class ValidationError(GitModelError):
4652 """
4753 Raised when an invalid value is encountered
4854 """
55+
4956 def __init__ (self , msg_or_code , field = None , ** kwargs ):
5057 self .field = field
5158 self .msg_or_code = msg_or_code
5259 if self .field :
53- msg = self .field .get_error_message (msg_or_code ,
54- default = msg_or_code ,
55- ** kwargs )
60+ msg = self .field .get_error_message (
61+ msg_or_code , default = msg_or_code , ** kwargs
62+ )
5663 else :
5764 msg = msg_or_code
5865 super (ValidationError , self ).__init__ (msg )
@@ -62,11 +69,13 @@ class IntegrityError(GitModelError):
6269 """
6370 Raised when a save results in duplicate values
6471 """
72+
6573 pass
6674
6775
6876class ModelNotFound (Exception ):
6977 """
7078 Raised during deserialization if the model class no longer exists
7179 """
80+
7281 pass
0 commit comments