aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorBwko2016-12-01 00:56:15 +0100
committerKim "BKC" Carlbäcker2016-12-02 07:41:19 +0100
commit4ff0db0246fa8a2add1032220024975203b93d72 (patch)
tree6395dd608ba47cc6429bc12d9595f09ebb915f02 /main.go
parent5ab85372da74bd95f7143fd59c2c600d4c9894d0 (diff)
Catch os... errors
Diffstat (limited to 'main.go')
-rw-r--r--main.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/main.go b/main.go
index b55da73fb..338340008 100644
--- a/main.go
+++ b/main.go
@@ -10,6 +10,8 @@ import (
"os"
"runtime"
+ "code.gitea.io/gitea/modules/log"
+
"code.gitea.io/gitea/cmd"
"code.gitea.io/gitea/modules/setting"
"github.com/urfave/cli"
@@ -37,5 +39,9 @@ func main() {
cmd.CmdAdmin,
}
app.Flags = append(app.Flags, []cli.Flag{}...)
- app.Run(os.Args)
+ err := app.Run(os.Args)
+ if err != nil {
+ log.Fatal(4, "Fail to run app with %s: %v", os.Args, err)
+ }
+
}