try:
f = open("hello1.txt",'r')
except Exception as e:
print (e)
try:
print (a)
except Exception as e:
print(e)
raise抛出一个自定义异常,抛出的异常类型必须是python内的类型。
try:
f = open("hello1.txt",'r')
except Exception as e:
print (e)
try:
print (a)
except Exception as e:
print(e)
raise抛出一个自定义异常,抛出的异常类型必须是python内的类型。