refactor error handling in vat, cat, vow

This commit is contained in:
yaoandrew
2019-01-11 10:07:00 -08:00
parent 525fada3d7
commit bc8b7a101c
11 changed files with 221 additions and 121 deletions
+1 -1
View File
@@ -46,7 +46,7 @@ func (repository CatFileFlipRepository) Create(headerID int64, models []interfac
VALUES($1, $2, $3, $4, $5, $6, $7)`,
headerID, flip.Ilk, flip.What, flip.Flip, flip.TransactionIndex, flip.LogIndex, flip.Raw,
)
if execErr != nil {
if execErr != nil {
rollbackErr := tx.Rollback()
if rollbackErr != nil {
log.Println("failed to rollback ", rollbackErr)