From 7df7f0fea2df63902eab51f27d798ca8c143be5d Mon Sep 17 00:00:00 2001 From: "Gerasimos (Makis) Maropoulos" Date: Tue, 16 Apr 2019 18:08:03 +0300 Subject: [PATCH] clean up the mvc error handler example Former-commit-id: 30e42fe0a6c39909739ec6423d75a2be0fe4f1f6 --- _examples/mvc/error-handler/main.go | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/_examples/mvc/error-handler/main.go b/_examples/mvc/error-handler/main.go index 3ded7b38..1104e861 100644 --- a/_examples/mvc/error-handler/main.go +++ b/_examples/mvc/error-handler/main.go @@ -26,18 +26,13 @@ func main() { app.Run(iris.Addr(":8080")) } -func basicMVC(app *mvc.Application) { - // GET: http://localhost:8080 - app.Handle(new(myController)) -} - type myController struct { } // overriddes the mvcApp.HandleError function. -// func (c *myController) HandleError(ctx iris.Context, err error) { -// ctx.HTML(fmt.Sprintf("%s", err.Error())) -// } +func (c *myController) HandleError(ctx iris.Context, err error) { + ctx.HTML(fmt.Sprintf("%s", err.Error())) +} func (c *myController) Get() error { return fmt.Errorf("error here")