mirror of
https://github.com/gogs/gogs.git
synced 2025-05-31 11:42:13 +00:00
Minor improve on error handling
This commit is contained in:
parent
d9d329bec8
commit
f5dc436441
@ -364,7 +364,7 @@ func (pr *PullRequest) testPatch() (err error) {
|
|||||||
log.Trace("PullRequest[%d].testPatch (patchPath): %s", pr.ID, patchPath)
|
log.Trace("PullRequest[%d].testPatch (patchPath): %s", pr.ID, patchPath)
|
||||||
|
|
||||||
if err := pr.BaseRepo.UpdateLocalCopyBranch(pr.BaseBranch); err != nil {
|
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
|
pr.Status = PULL_REQUEST_STATUS_CHECKING
|
||||||
|
@ -118,9 +118,6 @@ func (ctx *Context) NotFoundOrServerError(title string, errck func(error) bool,
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (ctx *Context) HandleText(status int, title string) {
|
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))
|
ctx.PlainText(status, []byte(title))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user