import warnings


class SchrodingerException(Exception):

    @property
    def message(self):
        """Returns the first argument used to construct this error."""
        return self.args[0]


class InvalidArgumentException(SchrodingerException):
    def __init__(self):
        warnings.warn(
            'InvalidArgumentException is deprecated and will be removed in a future version of ldclient.  '
            'Please use python\'s builtin exceptions such as TypeError or ValueError instead',
            FutureWarning)


class AsyncServiceTaskFailedError(SchrodingerException):
    pass


class ServerProcessingError(SchrodingerException):
    pass
