summaryrefslogtreecommitdiffstats
path: root/models/error.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-08-11 23:24:40 +0800
committerUnknwon <u@gogs.io>2015-08-11 23:24:40 +0800
commit34f6cbfc2a13295d2c8ab33f17ddbca27337b18b (patch)
tree1264ba8fa4370d05c0f5efcd81d7e28380110454 /models/error.go
parent89c2bd4a0dd85261f72565ba8395644da8129fea (diff)
downloadgitea-34f6cbfc2a13295d2c8ab33f17ddbca27337b18b.tar.gz
gitea-34f6cbfc2a13295d2c8ab33f17ddbca27337b18b.zip
finish attachments when create issue
Diffstat (limited to 'models/error.go')
-rw-r--r--models/error.go21
1 files changed, 21 insertions, 0 deletions
diff --git a/models/error.go b/models/error.go
index 91acd9cb11..8fc0ba77fb 100644
--- a/models/error.go
+++ b/models/error.go
@@ -279,3 +279,24 @@ func IsErrMilestoneNotExist(err error) bool {
func (err ErrMilestoneNotExist) Error() string {
return fmt.Sprintf("milestone does not exist [id: %d, repo_id: %d]", err.ID, err.RepoID)
}
+
+// _____ __ __ .__ __
+// / _ \_/ |__/ |______ ____ | |__ _____ ____ _____/ |_
+// / /_\ \ __\ __\__ \ _/ ___\| | \ / \_/ __ \ / \ __\
+// / | \ | | | / __ \\ \___| Y \ Y Y \ ___/| | \ |
+// \____|__ /__| |__| (____ /\___ >___| /__|_| /\___ >___| /__|
+// \/ \/ \/ \/ \/ \/ \/
+
+type ErrAttachmentNotExist struct {
+ ID int64
+ UUID string
+}
+
+func IsErrAttachmentNotExist(err error) bool {
+ _, ok := err.(ErrAttachmentNotExist)
+ return ok
+}
+
+func (err ErrAttachmentNotExist) Error() string {
+ return fmt.Sprintf("attachment does not exist [id: %d, uuid: %s]", err.ID, err.UUID)
+}