python 获取异常全部信息

 

import traceback 

try:
        logWorkflowInfo('Execute the commond:' + executeStr)
        os.system(executeStr)
            
    except Exception:
        exstr = traceback.format_exc() 
        print  exstr 

你可能感兴趣的:(python)