Difficult-Rocket/Difficult_Rocket/api/Exp.py

41 lines
836 B
Python
Raw Normal View History

2021-09-08 23:38:34 +08:00
# -------------------------------
# Difficult Rocket
# Copyright © 2021 by shenjackyuanjie
# All rights reserved
# -------------------------------
2021-09-02 22:47:10 +08:00
"""
writen by shenjackyuanjie
mail: 3695888@qq.com
github: @shenjackyuanjie
gitee: @shenjackyuanjie
"""
2021-09-08 23:38:34 +08:00
2021-09-02 22:47:10 +08:00
class Error(Exception):
"""基础 Exception"""
pass
class TexturesError(Error):
"""材质相关error 包含info和textures"""
2021-09-05 00:50:05 +08:00
2021-09-02 22:47:10 +08:00
def __init__(self, info, textures):
self.info = info
self.textures = textures
def __str__(self):
return '{}{}'.format(self.info, self.textures)
class LanguageError(Error):
"""lang文件相关error 包含info和language"""
2021-09-05 00:50:05 +08:00
2021-09-02 22:47:10 +08:00
def __init__(self, info, language):
self.info = info
self.lang = language
def __str__(self):
return '{}{}'.format(self.info, self.lang)