view resfinder/cge/output/exceptions.py @ 0:a16d245332d6 draft default tip

Uploaded
author dcouvin
date Wed, 08 Dec 2021 01:46:07 +0000
parents
children
line wrap: on
line source

#!/usr/bin/env python3


class DuplicateKeyError(Exception):
    """ Raise when adding the same key to a dict twice."""
    def __init__(self, message, *args):
        self.message = message
        # allow users initialize misc. arguments as any other builtin Error
        super(DuplicateKeyError, self).__init__(message, *args)


class LockedObjectError(Exception):
    """ Raise when attempting to alter a locked object."""
    def __init__(self, message, *args):
        self.message = message
        # allow users initialize misc. arguments as any other builtin Error
        super(LockedObjectError, self).__init__(message, *args)