maestral.errorhandling ====================== .. py:module:: maestral.errorhandling .. autoapi-nested-parse:: This module contains methods and decorators to convert OSErrors and Dropbox SDK exceptions to instances of :exc:`maestral.exceptions.MaestralApiError`. Module Contents --------------- .. py:data:: CONNECTION_ERRORS .. py:function:: convert_api_errors(dbx_path = None, local_path = None) A context manager that catches and re-raises instances of :exc:`OSError` and :exc:`dropbox.exceptions.DropboxException` as :exc:`maestral.exceptions.MaestralApiError` or :exc:`ConnectionError`. :param dbx_path: Dropbox path associated with the error. :param local_path: Local path associated with the error. .. py:function:: os_to_maestral_error(exc, dbx_path = None, local_path = None) Converts a :exc:`OSError` to a :exc:`maestral.exceptions.MaestralApiError` and tries to add a reasonably informative error title and message. :param exc: Original OSError. :param dbx_path: Dropbox path associated with the error. :param local_path: Local path associated with the error. :returns: Converted exception. .. py:function:: dropbox_to_maestral_error(exc, dbx_path = None, local_path = None) Converts a Dropbox SDK exception to a :exc:`maestral.exceptions.MaestralApiError` and tries to add a reasonably informative error title and message. :param exc: Dropbox SDK exception.. :param dbx_path: Dropbox path associated with the error. :param local_path: Local path associated with the error. :returns: Converted exception.