python利用try_except打印错误信息,并继续执行

    try:#jia
        print('.............')
    except Exception as e:
        #print('错误类型是',e.__class__.__name__)#except:#jia
        print('错误明细是',e.__class__.__name__,e)   #continue#jia
        continue

你可能感兴趣的:(笔记)