2022-06-27 16:51:14 +08:00
|
|
|
# -------------------------------
|
|
|
|
# Difficult Rocket
|
|
|
|
# Copyright © 2021-2022 by shenjackyuanjie 3695888@qq.com
|
|
|
|
# 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 啦"""
|
2022-06-27 16:51:14 +08:00
|
|
|
|
|
|
|
|