📜  例外情况除外:- Python 代码示例

📅  最后修改于: 2022-03-11 14:45:16.770000             🧑  作者: Mango

代码示例1
>>> def catch():
...     try:
...         asd()
...     except Exception as e:
...         print e.message, e.args
... 
>>> catch()
global name 'asd' is not defined ("global name 'asd' is not defined",)