mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-04-27 14:57:41 +00:00
Some doc fixes for exceptions
This commit is contained in:
parent
0a1db301ad
commit
d2f7d9a227
1 changed files with 9 additions and 10 deletions
|
|
@ -9,12 +9,10 @@
|
||||||
|
|
||||||
|
|
||||||
class Error(Exception):
|
class Error(Exception):
|
||||||
|
|
||||||
'''Baseclass for all errors.'''
|
'''Baseclass for all errors.'''
|
||||||
|
|
||||||
|
|
||||||
class PreconditionFailed(Error):
|
class PreconditionFailed(Error):
|
||||||
|
|
||||||
'''
|
'''
|
||||||
- The item doesn't exist although it should
|
- The item doesn't exist although it should
|
||||||
- The item exists although it shouldn't
|
- The item exists although it shouldn't
|
||||||
|
|
@ -26,36 +24,37 @@ class PreconditionFailed(Error):
|
||||||
|
|
||||||
|
|
||||||
class NotFoundError(PreconditionFailed):
|
class NotFoundError(PreconditionFailed):
|
||||||
|
|
||||||
'''Item not found'''
|
'''Item not found'''
|
||||||
|
|
||||||
|
|
||||||
class AlreadyExistingError(PreconditionFailed):
|
class AlreadyExistingError(PreconditionFailed):
|
||||||
|
|
||||||
'''Item already exists'''
|
'''Item already exists'''
|
||||||
|
|
||||||
|
|
||||||
class WrongEtagError(PreconditionFailed):
|
class WrongEtagError(PreconditionFailed):
|
||||||
|
|
||||||
'''Wrong etag'''
|
'''Wrong etag'''
|
||||||
|
|
||||||
|
|
||||||
class StorageError(Error):
|
class StorageError(Error):
|
||||||
|
|
||||||
'''Internal or initialization errors with storage.'''
|
'''Internal or initialization errors with storage.'''
|
||||||
|
|
||||||
|
|
||||||
class SyncError(Error):
|
class SyncError(Error):
|
||||||
pass
|
'''Errors related to synchronization.'''
|
||||||
|
|
||||||
|
|
||||||
class SyncConflict(SyncError):
|
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):
|
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
|
@property
|
||||||
def empty_storage(self):
|
def empty_storage(self):
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue