Commit c773c976 authored by kinomin's avatar kinomin

初始化项目

parent 42bec0a7
class MyError(Exception):
def __init__(self, ErrorInfo):
super().__init__(self)
self.errorinfo = ErrorInfo
def __str__(self):
return self.errorinfo
if __name__ == '__main__':
try:
raise MyError('零异常')
except MyError as e:
print("my exception currend:", e.errorinfo)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment