Skip to content

Commit

Permalink
Minor improve on error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
unknwon committed Feb 10, 2017
1 parent d9d329b commit f5dc436
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion models/pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions modules/context/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}

Expand Down

0 comments on commit f5dc436

Please sign in to comment.