Skip to content

Commit

Permalink
modify: error stack
Browse files Browse the repository at this point in the history
  • Loading branch information
winfredLIN committed Nov 29, 2024
1 parent eaa8e5d commit 897b653
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions sqle/server/sqled.go
Original file line number Diff line number Diff line change
Expand Up @@ -488,17 +488,14 @@ func (a *action) backupAndExecSql() error {
if svc.CheckCanTaskBackup(a.task) {
backupTask, err := toBackupTask(a.plugin, executeSQL)
if err != nil {
log.Logger().Errorf("in backupAndExecSql when convert toBackupTask, err %v ", err)
return err
return fmt.Errorf("in backupAndExecSql when convert toBackupTask, err %w , backup task: %v, task: %v", err, executeSQL.BackupTask.ID, a.task.ID)
}
if err = backupTask.Backup(); err != nil {
log.Logger().Errorf("in backupAndExecSql when backupTask Backup, err %v ", err)
return err
return fmt.Errorf("in backupAndExecSql when backupTask Backup, err %w, backup task: %v, task: %v", err, executeSQL.BackupTask.ID, a.task.ID)
}
}
if err := a.execSQL(executeSQL); err != nil {
log.Logger().Errorf("in backupAndExecSql when execSQL %v, err %v ", executeSQL, err)
return err
return fmt.Errorf("in backupAndExecSql when execSQL %v, err %w, backup task: %v, task: %v", executeSQL, err, executeSQL.BackupTask.ID, a.task.ID)
}
}
return nil
Expand Down

0 comments on commit 897b653

Please sign in to comment.