From f5dc43644184a7c3f613d5f3e1aa1be8ed8d13af Mon Sep 17 00:00:00 2001 From: Unknwon Date: Fri, 10 Feb 2017 00:11:51 -0500 Subject: [PATCH] Minor improve on error handling --- models/pull.go | 2 +- modules/context/context.go | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/models/pull.go b/models/pull.go index 97ca54448..efb248948 100644 --- a/models/pull.go +++ b/models/pull.go @@ -364,7 +364,7 @@ func (pr *PullRequest) testPatch() (err error) { log.Trace("PullRequest[%d].testPatch (patchPath): %s", pr.ID, patchPath) if err := pr.BaseRepo.UpdateLocalCopyBranch(pr.BaseBranch); err != nil { - return fmt.Errorf("UpdateLocalCopy: %v", err) + return fmt.Errorf("UpdateLocalCopy [%d]: %v", pr.BaseRepoID, err) } pr.Status = PULL_REQUEST_STATUS_CHECKING diff --git a/modules/context/context.go b/modules/context/context.go index 296608f0c..a9a5e270e 100644 --- a/modules/context/context.go +++ b/modules/context/context.go @@ -118,9 +118,6 @@ func (ctx *Context) NotFoundOrServerError(title string, errck func(error) bool, } func (ctx *Context) HandleText(status int, title string) { - if (status/100 == 4) || (status/100 == 5) { - log.Error(4, "%s", title) - } ctx.PlainText(status, []byte(title)) }