diff options
author | Unknwon <u@gogs.io> | 2016-03-26 16:42:20 -0400 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2016-03-26 16:42:20 -0400 |
commit | ac53bb593d12bac3b44380defe73d13e728cd142 (patch) | |
tree | 8907912c671463e5c167a021ded4fc52d1d0e15c | |
parent | dd36c431ece67e47beb0e64070015808627538e5 (diff) | |
download | gitea-ac53bb593d12bac3b44380defe73d13e728cd142.tar.gz gitea-ac53bb593d12bac3b44380defe73d13e728cd142.zip |
#2878 print error of JSON unmarshal and always returns a valid object
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | docker/README.md | 2 | ||||
-rw-r--r-- | gogs.go | 2 | ||||
-rw-r--r-- | modules/template/template.go | 3 | ||||
-rw-r--r-- | templates/.VERSION | 2 |
5 files changed, 7 insertions, 4 deletions
@@ -3,7 +3,7 @@ Gogs - Go Git Service [ -##### Current version: 0.9.16 +##### Current version: 0.9.17 | Web | UI | Preview | |:-------------:|:-------:|:-------:| diff --git a/docker/README.md b/docker/README.md index 07bf780c3f..1b18b8e787 100644 --- a/docker/README.md +++ b/docker/README.md @@ -43,9 +43,11 @@ If you're more comfortable with mounting data to a data container, the commands ``` # Create data container docker run --name=gogs-data --entrypoint /bin/true gogs/gogs + # Use `docker run` for the first time. docker run --name=gogs --volumes-from gogs-data -p 10022:22 -p 10080:3000 gogs/gogs ``` + #### Using Docker 1.9 Volume command ``` @@ -17,7 +17,7 @@ import ( "github.com/gogits/gogs/modules/setting" ) -const APP_VER = "0.9.16.0325" +const APP_VER = "0.9.17.0326" func init() { runtime.GOMAXPROCS(runtime.NumCPU()) diff --git a/modules/template/template.go b/modules/template/template.go index c5379e188f..7c35449737 100644 --- a/modules/template/template.go +++ b/modules/template/template.go @@ -18,6 +18,7 @@ import ( "github.com/gogits/gogs/models" "github.com/gogits/gogs/modules/base" + "github.com/gogits/gogs/modules/log" "github.com/gogits/gogs/modules/markdown" "github.com/gogits/gogs/modules/setting" ) @@ -255,7 +256,7 @@ func ActionIcon(opType int) string { func ActionContent2Commits(act Actioner) *models.PushCommits { push := models.NewPushCommits() if err := json.Unmarshal([]byte(act.GetContent()), push); err != nil { - return nil + log.Error(4, "json.Unmarshal:\n%s\nERROR: %v", act.GetContent(), err) } return push } diff --git a/templates/.VERSION b/templates/.VERSION index d9a598020f..c9a2d04380 100644 --- a/templates/.VERSION +++ b/templates/.VERSION @@ -1 +1 @@ -0.9.16.0325
\ No newline at end of file +0.9.17.0326
\ No newline at end of file |