官方文档:https://docs.python.org/3/library/exceptions.html
1. 使用try...except...
2. 输出错误信息的方式为:
try: cursor.execute(sql) db.commit() except Exception as inst: print(inst.args) db.rollback()
3.
时间: 2024-10-10 05:42:01
官方文档:https://docs.python.org/3/library/exceptions.html
1. 使用try...except...
2. 输出错误信息的方式为:
try: cursor.execute(sql) db.commit() except Exception as inst: print(inst.args) db.rollback()
3.