maestral.errorhandling
This module contains methods and decorators to convert OSErrors and Dropbox SDK
exceptions to instances of maestral.exceptions.MaestralApiError
.
Module Contents
- maestral.errorhandling.convert_api_errors(dbx_path=None, local_path=None)[source]
A context manager that catches and re-raises instances of
OSError
anddropbox.exceptions.DropboxException
asmaestral.exceptions.MaestralApiError
orConnectionError
.
- maestral.errorhandling.os_to_maestral_error(exc, dbx_path=None, local_path=None)[source]
Converts a
OSError
to amaestral.exceptions.MaestralApiError
and tries to add a reasonably informative error title and message.
- maestral.errorhandling.dropbox_to_maestral_error(exc, dbx_path=None, local_path=None)[source]
Converts a Dropbox SDK exception to a
maestral.exceptions.MaestralApiError
and tries to add a reasonably informative error title and message.- Parameters
- Returns
Converted exception.
- Return type