|
@@ -45,7 +45,8 @@ class MysqlDB:
|
|
|
try:
|
|
|
self.cursor.execute(sql)
|
|
|
self.con.commit()
|
|
|
- except:
|
|
|
+ except Exception as e:
|
|
|
+ print(str(e))
|
|
|
self.con.rollback()
|
|
|
|
|
|
def add_some(self, sql, data):
|
|
@@ -60,7 +61,8 @@ class MysqlDB:
|
|
|
try:
|
|
|
self.cursor.execute(sql, data)
|
|
|
self.con.commit()
|
|
|
- except:
|
|
|
+ except Exception as e:
|
|
|
+ print(str(e))
|
|
|
self.con.rollback()
|
|
|
|
|
|
def truncate(self, table_name):
|