summaryrefslogtreecommitdiffstats
path: root/models/error.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-08-10 14:42:50 +0800
committerUnknwon <u@gogs.io>2015-08-10 14:42:50 +0800
commit17de3ab0a313819bdeb73f3985b61a791ae84696 (patch)
tree55b8faa356fe7c79e6910d0b7cfe1fae606bb503 /models/error.go
parent48f12d4eaddf08282086199d94a306b47483521f (diff)
downloadgitea-17de3ab0a313819bdeb73f3985b61a791ae84696.tar.gz
gitea-17de3ab0a313819bdeb73f3985b61a791ae84696.zip
add migrate from issue.label_ids to issue_label
Diffstat (limited to 'models/error.go')
-rw-r--r--models/error.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/models/error.go b/models/error.go
index 0e554e5273..70285b3a34 100644
--- a/models/error.go
+++ b/models/error.go
@@ -239,6 +239,26 @@ func (err ErrRepoAlreadyExist) Error() string {
return fmt.Sprintf("repository already exists [uname: %d, name: %s]", err.Uname, err.Name)
}
+// .____ ___. .__
+// | | _____ \_ |__ ____ | |
+// | | \__ \ | __ \_/ __ \| |
+// | |___ / __ \| \_\ \ ___/| |__
+// |_______ (____ /___ /\___ >____/
+// \/ \/ \/ \/
+
+type ErrLabelNotExist struct {
+ ID int64
+}
+
+func IsErrLabelNotExist(err error) bool {
+ _, ok := err.(ErrLabelNotExist)
+ return ok
+}
+
+func (err ErrLabelNotExist) Error() string {
+ return fmt.Sprintf("label does not exist [id: %d]", err.ID)
+}
+
// _____ .__.__ __
// / \ |__| | ____ _______/ |_ ____ ____ ____
// / \ / \| | | _/ __ \ / ___/\ __\/ _ \ / \_/ __ \