Documentation
¶
Index ¶
- Variables
- func ErrorText(code int) string
- func HandleError(w http.ResponseWriter, r *http.Request, err error)
- func HandleMiddlewareError(w http.ResponseWriter, r *http.Request, err error, next http.Handler)
- func MethodNotAllowed(method string, allowed ...string) web.Error
- func Panic(rvr interface{}) web.Error
- type HandlerError
- type MethodNotAllowedError
- type PanicError
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNotFound = &HandlerError{Code: http.StatusNotFound}
)
Functions ¶
func HandleError ¶
func HandleError(w http.ResponseWriter, r *http.Request, err error)
func HandleMiddlewareError ¶ added in v0.2.0
Types ¶
type HandlerError ¶
Reference Handler error
func (HandlerError) Error ¶
func (err HandlerError) Error() string
func (HandlerError) ServeHTTP ¶
func (err HandlerError) ServeHTTP(w http.ResponseWriter, _ *http.Request)
func (HandlerError) Status ¶
func (err HandlerError) Status() int
func (HandlerError) String ¶
func (err HandlerError) String() string
func (HandlerError) Unwrap ¶
func (err HandlerError) Unwrap() error
type MethodNotAllowedError ¶ added in v0.3.0
func (*MethodNotAllowedError) Error ¶ added in v0.3.0
func (err *MethodNotAllowedError) Error() string
func (*MethodNotAllowedError) ServeHTTP ¶ added in v0.3.0
func (err *MethodNotAllowedError) ServeHTTP(w http.ResponseWriter, _ *http.Request)
func (*MethodNotAllowedError) Status ¶ added in v0.3.0
func (err *MethodNotAllowedError) Status() int
type PanicError ¶ added in v0.3.0
type PanicError struct {
// contains filtered or unexported fields
}
func (PanicError) Error ¶ added in v0.3.0
func (p PanicError) Error() string
func (PanicError) ServeHTTP ¶ added in v0.3.0
func (p PanicError) ServeHTTP(w http.ResponseWriter, r *http.Request)
func (PanicError) Stack ¶ added in v0.3.0
func (p PanicError) Stack() []string
func (PanicError) Status ¶ added in v0.3.0
func (_ PanicError) Status() int
func (PanicError) String ¶ added in v0.3.0
func (p PanicError) String() string
func (PanicError) Unwrap ¶ added in v0.3.0
func (p PanicError) Unwrap() error
Click to show internal directories.
Click to hide internal directories.