📜  python print error traceback - Python代码示例

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

代码示例2
import traceback

try:
    raise TypeError("Oups!")
except Exception, err:
    try:
        raise TypeError("Again !?!")
    except:
        pass

    traceback.print_exc()