forked from p15670423/monkey
Island: Add RepositoryError
This commit is contained in:
parent
e374341ce1
commit
3c2ee32bdf
|
@ -1,4 +1,4 @@
|
|||
from .errors import RemovalError, RetrievalError, StorageError, UnknownRecordError
|
||||
from .errors import RemovalError, RepositoryError, RetrievalError, StorageError, UnknownRecordError
|
||||
|
||||
|
||||
from .i_file_repository import FileNotFoundError, IFileRepository
|
||||
|
|
|
@ -1,22 +1,28 @@
|
|||
class RemovalError(RuntimeError):
|
||||
class RepositoryError(RuntimeError):
|
||||
"""
|
||||
Raised when a repository encounters an error while attempting any operation.
|
||||
"""
|
||||
|
||||
|
||||
class RemovalError(RepositoryError):
|
||||
"""
|
||||
Raised when a repository encounters an error while attempting to remove data.
|
||||
"""
|
||||
|
||||
|
||||
class RetrievalError(RuntimeError):
|
||||
class RetrievalError(RepositoryError):
|
||||
"""
|
||||
Raised when a repository encounters an error while attempting to retrieve data.
|
||||
"""
|
||||
|
||||
|
||||
class StorageError(RuntimeError):
|
||||
class StorageError(RepositoryError):
|
||||
"""
|
||||
Raised when a repository encounters an error while attempting to store data.
|
||||
"""
|
||||
|
||||
|
||||
class UnknownRecordError(RuntimeError):
|
||||
class UnknownRecordError(RepositoryError):
|
||||
"""
|
||||
Raised when the repository does not contain any data matching the request.
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue