Skip to content

Commit

Permalink
checker: keep the original database error in the error message (pingc…
Browse files Browse the repository at this point in the history
  • Loading branch information
csuzhangxc authored Sep 10, 2019
1 parent 2c262b8 commit 519c2ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions checker/checker.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func (c *Checker) Init() (err error) {
}
instance.sourceDB, err = dbutil.OpenDB(*instance.sourceDBinfo)
if err != nil {
return terror.WithScope(terror.ErrTaskCheckFailedOpenDB.Generate(instance.cfg.From.User, instance.cfg.From.Host, instance.cfg.From.Port), terror.ScopeUpstream)
return terror.WithScope(terror.ErrTaskCheckFailedOpenDB.Delegate(err, instance.cfg.From.User, instance.cfg.From.Host, instance.cfg.From.Port), terror.ScopeUpstream)
}

instance.targetDBInfo = &dbutil.DBConfig{
Expand All @@ -137,7 +137,7 @@ func (c *Checker) Init() (err error) {
}
instance.targetDB, err = dbutil.OpenDB(*instance.targetDBInfo)
if err != nil {
return terror.WithScope(terror.ErrTaskCheckFailedOpenDB.Generate(instance.cfg.To.User, instance.cfg.To.Host, instance.cfg.To.Port), terror.ScopeDownstream)
return terror.WithScope(terror.ErrTaskCheckFailedOpenDB.Delegate(err, instance.cfg.To.User, instance.cfg.To.Host, instance.cfg.To.Port), terror.ScopeDownstream)
}

if _, ok := c.checkingItems[config.VersionChecking]; ok {
Expand Down

0 comments on commit 519c2ab

Please sign in to comment.