server-go/web/error.go
crusader 8915cba78b ing
2018-04-06 13:06:05 +09:00

18 lines
241 B
Go

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
}