codegangsta/martini — pull request #104 by nbjahan (2013-12-04 11:39:00+00:00)
Title: Treat NotFound as a route

At my first try with Martini I expected NotFound handler to work this way:

```go
router.NotFound(func() (int, string) {
return 404, ""
})
```

I was wrong. NotFound handler is not like the router handlers and it will be called with `context.Invoke`

With these changes we will be able to define/stack multiple NotFound handlers and expect that NotFound is just another route.

```go
body := ""
router.NotFound(func(c martini.Context) {
body += "1"
c.Next()
body += "2"

}, func() (int, string) {
body += "3"
return 404, body
})
```

`curl -i 127.0.0.1:3000/404`
```
HTTP/1.1 404 Not Found
Date: Wed, 04 Dec 2013 11:34:28 GMT
Content-Length: 2
Content-Type: text/plain; charset=utf-8

13
```

Ok that was a bad example, but what's your thought on this?