summaryrefslogtreecommitdiffstats
path: root/models/error.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-08-27 23:06:14 +0800
committerUnknwon <u@gogs.io>2015-08-27 23:06:14 +0800
commit23f42d92c917564435a00e8e75633b8056bd7b0d (patch)
tree6fed7f6df4c6b039e4e43eaae2fcd5788ddba3a0 /models/error.go
parentfc2d0e5470fa2fea260adba30866acda1aa945cb (diff)
downloadgitea-23f42d92c917564435a00e8e75633b8056bd7b0d.tar.gz
gitea-23f42d92c917564435a00e8e75633b8056bd7b0d.zip
add webhook recent deliveries
Diffstat (limited to 'models/error.go')
-rw-r--r--models/error.go22
1 files changed, 21 insertions, 1 deletions
diff --git a/models/error.go b/models/error.go
index 914aec8e79..a7c8f5def3 100644
--- a/models/error.go
+++ b/models/error.go
@@ -236,7 +236,27 @@ func IsErrRepoAlreadyExist(err error) bool {
}
func (err ErrRepoAlreadyExist) Error() string {
- return fmt.Sprintf("repository already exists [uname: %d, name: %s]", err.Uname, err.Name)
+ return fmt.Sprintf("repository already exists [uname: %s, name: %s]", err.Uname, err.Name)
+}
+
+// __ __ ___. .__ __
+// / \ / \ ____\_ |__ | |__ ____ ____ | | __
+// \ \/\/ // __ \| __ \| | \ / _ \ / _ \| |/ /
+// \ /\ ___/| \_\ \ Y ( <_> | <_> ) <
+// \__/\ / \___ >___ /___| /\____/ \____/|__|_ \
+// \/ \/ \/ \/ \/
+
+type ErrWebhookNotExist struct {
+ ID int64
+}
+
+func IsErrWebhookNotExist(err error) bool {
+ _, ok := err.(ErrWebhookNotExist)
+ return ok
+}
+
+func (err ErrWebhookNotExist) Error() string {
+ return fmt.Sprintf("webhook does not exist [id: %d]", err.ID)
}
// .___