异常

try:
    raise Exception("AAAA", "BBB")
except Exception as e:
    print(e)  # ('AAAA', 'BBB')
    print(type(e))  # 
    print(e.args)  # ('AAAA', 'BBB')
    print(type(e.args))  # 

你可能感兴趣的:(异常)