📜  python raise 和 exit - Python 代码示例

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

代码示例1
def main():    
    try:
       create_logdir()
       create_dataset()
       unittest.main()    
    except Exception as e:
       logging.exception(e)
       raise SystemExit

if __name__ == '__main__':    
    main()