diff options
Diffstat (limited to 'buildstream/storage/directory.py')
-rw-r--r-- | buildstream/storage/directory.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/buildstream/storage/directory.py b/buildstream/storage/directory.py index 40a895acc..984a7f0dd 100644 --- a/buildstream/storage/directory.py +++ b/buildstream/storage/directory.py @@ -31,6 +31,19 @@ See also: :ref:`sandboxing`. """ +from .._exceptions import BstError, ErrorDomain + + +class VirtualDirectoryError(BstError): + """Raised by Directory functions when system calls fail. + This will be handled internally by the BuildStream core, + if you need to handle this error, then it should be reraised, + or either of the :class:`.ElementError` or :class:`.SourceError` + exceptions should be raised from this error. + """ + def __init__(self, message, reason=None): + super().__init__(message, domain=ErrorDomain.VIRTUAL_FS, reason=reason) + class Directory(): def __init__(self, external_directory=None): |