<reponame>magus0219/icloud-photo-downloader
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Created by magus0219[<EMAIL>] on 2020/3/22


class ArtascopeException(Exception):
    def __init__(self, msg=None):
        self.msg = msg

    def __str__(self):
        return "[{classname}]{info}".format(
            classname=type(self).__name__,  # 通过这种方法拿到子类名
            info=".".join(
                "{k}:{v}".format(k=key, v=value) for key, value in self.__dict__.items()
            ),
        )


class InvalidLoginStatus(ArtascopeException):
    pass


class APINotExisted(ArtascopeException):
    pass


class MissiCloudLoginCookie(ArtascopeException):
    pass


class UserConfigNotExisted(ArtascopeException):
    pass


class TaskNotExisted(ArtascopeException):
    pass


class FileStatusNotExisted(ArtascopeException):
    pass


class NeedLoginAgain(ArtascopeException):
    pass


class Gone(ArtascopeException):
    pass


class UnableToSendCaptcha(ArtascopeException):
    pass


class LoginTimeout(ArtascopeException):
    pass


class ApiLimitExceed(ArtascopeException):
    pass


class SlackSenderException(ArtascopeException):
    pass
