diff options
author | Unknwon <u@gogs.io> | 2015-09-01 19:07:02 -0400 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-09-01 19:07:02 -0400 |
commit | 8c046073a891e3a192794869628763ef072002eb (patch) | |
tree | a5de325078531c330da64f8361d43184fee894d3 /models/error.go | |
parent | 63fecac537298109253bc00c256336e942f73481 (diff) | |
download | gitea-8c046073a891e3a192794869628763ef072002eb.tar.gz gitea-8c046073a891e3a192794869628763ef072002eb.zip |
work on PR conversation
Diffstat (limited to 'models/error.go')
-rw-r--r-- | models/error.go | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/models/error.go b/models/error.go index a7c8f5def3..4d888c870b 100644 --- a/models/error.go +++ b/models/error.go @@ -281,6 +281,27 @@ func (err ErrIssueNotExist) Error() string { return fmt.Sprintf("issue does not exist [id: %d, repo_id: %d, index: %d]", err.ID, err.RepoID, err.Index) } +// __________ .__ .__ __________ __ +// \______ \__ __| | | |\______ \ ____ ________ __ ____ _______/ |_ +// | ___/ | \ | | | | _// __ \/ ____/ | \_/ __ \ / ___/\ __\ +// | | | | / |_| |_| | \ ___< <_| | | /\ ___/ \___ \ | | +// |____| |____/|____/____/____|_ /\___ >__ |____/ \___ >____ > |__| +// \/ \/ |__| \/ \/ + +type ErrPullRepoNotExist struct { + ID int64 + PullID int64 +} + +func IsErrPullRepoNotExist(err error) bool { + _, ok := err.(ErrPullRepoNotExist) + return ok +} + +func (err ErrPullRepoNotExist) Error() string { + return fmt.Sprintf("pull repo does not exist [id: %d, pull_id: %d]", err.ID, err.PullID) +} + // _________ __ // \_ ___ \ ____ _____ _____ ____ _____/ |_ // / \ \/ / _ \ / \ / \_/ __ \ / \ __\ |