Documentation
¶
Overview ¶
Package raven contains middleware than depends on github.com/kisielk/raven-go/raven
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildErrorCatcher ¶
Middleware that catches panics, and:
- logs them
- optionally reports them to sentry - pass in "" if you don't want this
- sends a 500 response
You can also use ThrowError() to raise an error that this middleware will catch, for example if you want an error to be reported to sentry
func ThrowError ¶
Types ¶
type HttpError ¶
An error that encapsulates an HTTP status code and message.
Use ThrowError() to build an HttpError and raise it as a panic
func (HttpError) WriteResponse ¶
func (h HttpError) WriteResponse(w http.ResponseWriter)
Click to show internal directories.
Click to hide internal directories.