You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
643 B

3 years ago
# !/usr/bin/env python3
# -*- encoding : utf-8 -*-
# @Filename : custom_exc.py
# @Software : VSCode
# @Datetime : 2021/11/03 17:15:42
# @Author : leo liu
# @Version : 1.0
# @Description :
"""
自定义异常
"""
from .messages import msg
class PostParamsError(Exception):
def __init__(self, err_desc: str=msg.MSG_WRONG_USERINFO):
self.err_desc = err_desc
class TokenAuthError(Exception):
def __init__(self, err_desc: str=msg.MSG_WRONG_TOKEN):
self.err_desc = err_desc
class UserNotFound(Exception):
def __init__(self, err_desc: str=msg.MSG_USER_UNSIGNUP):
self.err_desc = err_desc