MCPcopy Index your code
hub / github.com/kataras/iris / Error

Method Error

context/problem.go:215–221  ·  view source on GitHub ↗

Error method completes the go error. Returns the "[Status] Title" string form of this Problem. If Problem is not a valid one, it returns "invalid problem".

()

Source from the content-addressed store, hash-verified

213// Returns the "[Status] Title" string form of this Problem.
214// If Problem is not a valid one, it returns "invalid problem".
215func (p Problem) Error() string {
216 if !p.Validate() {
217 return "invalid problem"
218 }
219
220 return fmt.Sprintf("[%d] %s", p["status"], p["title"])
221}
222
223// MarshalXML makes this Problem XML-compatible content to render.
224func (p Problem) MarshalXML(e *xml.Encoder, start xml.StartElement) error {

Callers

nothing calls this directly

Calls 1

ValidateMethod · 0.95

Tested by

no test coverage detected