fetch_exception.py 570 B

1234567891011121314151617181920
  1. # -*- coding: utf-8 -*-
  2. # @Time : 2023/7/20 16:45
  3. # @Author : XuJiakai
  4. # @File : fetch_exception
  5. # @Software: PyCharm
  6. class FetchException(Exception):
  7. def __init__(self, response_status=None, response_content=None, msg=None):
  8. self.__response_status = response_status
  9. self.__response_content = response_content
  10. self.__msg = msg
  11. pass
  12. def __str__(self):
  13. return f"拉取数据异常,response status: {self.__response_status} , msg:{self.__msg} , content : {self.__response_content}"
  14. if __name__ == '__main__':
  15. pass