zl程序教程

您现在的位置是:首页 >  后端

当前栏目

【Python】【异常】

2023-09-11 14:16:50 时间

https://www.jianshu.com/p/2868b3193533

 

直接抛出异常 中断程序

 

捕获

    try:
        。。。
    except Exception as e:
        print(e.args[0].reason.args[0])