Browse Source

Fix error

Vova Tkach 6 years ago
parent
commit
22dcc79d8a
1 changed files with 3 additions and 0 deletions
  1. 3 0
      engine/sqlw/sqlw.go

+ 3 - 0
engine/sqlw/sqlw.go

@@ -59,6 +59,9 @@ func (this *DB) QueryRow(query string, args ...interface{}) *sql.Row {
 func (this *DB) Begin() (*Tx, error) {
 	tx, err := this.db.Begin()
 	if err != nil {
+		if consts.ParamDebug {
+			log("[TX] TRANSACTION START", time.Now(), err, true)
+		}
 		return nil, err
 	}
 	if consts.ParamDebug {