server-go/web/error.go

18 lines
241 B
Go
Raw Normal View History

2018-04-06 04:06:05 +00:00
package web
func NewWebError(code int, message string) *WebError {
return &WebError{
Code: code,
Message: message,
}
}
type WebError struct {
Code int
Message string
}
func (e *WebError) Error() string {
return e.Message
}