标签:自定义异常 turn ISE 类型 code 简单 style col exception
class CustomizeError(BaseException): def __init__(self, msg): self.msg = msg def __str__(self): return self.msg try: raise CustomizeError(‘错误类型‘) except CustomizeError as e: print(e)
标签:自定义异常 turn ISE 类型 code 简单 style col exception
原文地址:https://www.cnblogs.com/zjj1990/p/12924649.html