Some doc fixes for exceptions

This commit is contained in:
Markus Unterwaditzer 2014-05-02 18:13:13 +02:00
parent 0a1db301ad
commit d2f7d9a227

View file

@ -9,12 +9,10 @@
class Error(Exception):
'''Baseclass for all errors.'''
class PreconditionFailed(Error):
'''
- The item doesn't exist although it should
- The item exists although it shouldn't
@ -26,36 +24,37 @@ class PreconditionFailed(Error):
class NotFoundError(PreconditionFailed):
'''Item not found'''
class AlreadyExistingError(PreconditionFailed):
'''Item already exists'''
class WrongEtagError(PreconditionFailed):
'''Wrong etag'''
class StorageError(Error):
'''Internal or initialization errors with storage.'''
class SyncError(Error):
pass
'''Errors related to synchronization.'''
class SyncConflict(SyncError):
pass
'''
Two items changed since the last sync, they now have different contents and
no conflict resolution method was given.
'''
class StorageEmpty(SyncError):
'''One storage unexpectedly got completely empty between two
synchronizations. The first argument is the empty storage.'''
'''
One storage unexpectedly got completely empty between two synchronizations.
The first argument is the empty storage.
'''
@property
def empty_storage(self):