swh:1:snp:eb70f1f85391e4b077c211bec36af0061c4bf937
Raw File
Tip revision: 207971009c489fd1ec4734f7b418bd1b17178bdb authored by Jenkins for Software Heritage on 12 February 2020, 13:20:20 UTC
Updated backport on buster-swh from debian/0.0.172-1_swh1 (unstable-swh)
Tip revision: 2079710
exc.py
# Copyright (C) 2015-2016  The Software Heritage developers
# See the AUTHORS file at the top-level directory of this distribution
# License: GNU General Public License version 3, or any later version
# See top-level LICENSE file for more information


class StorageDBError(Exception):
    """Specific storage db error (connection, erroneous queries, etc...)

    """

    def __str__(self):
        return 'An unexpected error occurred in the backend: %s' % self.args


class StorageAPIError(Exception):
    """Specific internal storage api (mainly connection)

    """

    def __str__(self):
        args = self.args
        return 'An unexpected error occurred in the api backend: %s' % args


class StorageArgumentException(Exception):
    """Argument passed to a Storage endpoint is invalid."""
    pass
back to top