BackendError

exception audbackend.BackendError(exception)[source]

Wrapper for any error raised on the backend.

Parameters

exception (Exception) – exception raised by backend

Examples

>>> host = audeer.mkdir("host")
>>> audbackend.backend.FileSystem.create(host, "repo")
>>> backend = audbackend.backend.FileSystem(host, "repo")
>>> backend.open()
>>> try:
...     interface = audbackend.interface.Unversioned(backend)
...     interface.checksum("/does/not/exist")
... except BackendError as ex:
...     ex.exception
FileNotFoundError(2, 'No such file or directory')
>>> try:
...     interface = audbackend.interface.Versioned(backend)
...     interface.checksum("/does/not/exist", "1.0.0")
... except BackendError as ex:
...     ex.exception
FileNotFoundError(2, 'No such file or directory')