Page MenuHomeMusing Studio

errors.go
No OneTemporary

errors.go

package impart
import (
"net/http"
)
// HTTPError holds an HTTP status code and an error message.
type HTTPError struct {
Status int
Message string
}
// Error displays the HTTPError's error message and satisfies the error
// interface.
func (h HTTPError) Error() string {
if h.Message == "" {
return http.StatusText(h.Status)
}
return h.Message
}

File Metadata

Mime Type
text/plain
Expires
Mon, Jan 20, 4:50 AM (1 d, 18 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3137647

Event Timeline