aboutsummaryrefslogtreecommitdiffstats
path: root/models/error.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-11-27 01:50:38 -0500
committerUnknwon <u@gogs.io>2015-11-27 01:50:38 -0500
commite42fcb033d4a7ee44fe397be3e933d7031b7d8f7 (patch)
treea203fff39c92f947c4585a746e2345b3ebc67b3c /models/error.go
parent392f3ee21016476fb9794f78882d6c447acb8449 (diff)
downloadgitea-e42fcb033d4a7ee44fe397be3e933d7031b7d8f7.tar.gz
gitea-e42fcb033d4a7ee44fe397be3e933d7031b7d8f7.zip
wiki: finish edit
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 069346bef3..d005b9af73 100644
--- a/models/error.go
+++ b/models/error.go
@@ -107,6 +107,26 @@ func (err ErrUserHasOrgs) Error() string {
return fmt.Sprintf("user still has membership of organizations [uid: %d]", err.UID)
}
+// __ __.__ __ .__
+// / \ / \__| | _|__|
+// \ \/\/ / | |/ / |
+// \ /| | <| |
+// \__/\ / |__|__|_ \__|
+// \/ \/
+
+type ErrWikiAlreadyExist struct {
+ Title string
+}
+
+func IsErrWikiAlreadyExist(err error) bool {
+ _, ok := err.(ErrWikiAlreadyExist)
+ return ok
+}
+
+func (err ErrWikiAlreadyExist) Error() string {
+ return fmt.Sprintf("wiki page already exists [title: %s]", err.Title)
+}
+
// __________ ___. .__ .__ ____ __.
// \______ \__ _\_ |__ | | |__| ____ | |/ _|____ ___.__.
// | ___/ | \ __ \| | | |/ ___\ | <_/ __ < | |