Difficult-Rocket/Difficult_Rocket/exception/__init__.py

31 lines
569 B
Python
Raw Normal View History

2022-06-27 16:51:14 +08:00
# -------------------------------
# Difficult Rocket
2023-01-20 14:08:12 +08:00
# Copyright © 2020-2023 by shenjackyuanjie 3695888@qq.com
2022-06-27 16:51:14 +08:00
# All rights reserved
# -------------------------------
"""
2022-06-29 13:45:25 +08:00
writen by shenjackyuanjie
mail: 3695888@qq.com
github: @shenjackyuanjie
gitee: @shenjackyuanjie
2022-06-27 16:51:14 +08:00
"""
2022-06-29 13:45:25 +08:00
class BaseError(Exception):
"""基本 exp"""
2022-06-27 16:51:14 +08:00
2022-06-29 13:45:25 +08:00
def __bool__(self) -> bool:
2022-06-27 16:51:14 +08:00
return False
2022-06-29 13:45:25 +08:00
class BaseRuntimeError(RuntimeError):
"""基本 runtime exp"""
2022-06-27 16:51:14 +08:00
2022-06-29 13:45:25 +08:00
def __bool__(self) -> bool:
return False
2022-06-27 16:51:14 +08:00
2022-06-29 13:45:25 +08:00
class TestError(BaseRuntimeError):
"""在 test 啦"""