The error interface implementation, which formats to a JSON object string.
()
| 214 | |
| 215 | // The error interface implementation, which formats to a JSON object string. |
| 216 | func (e *Error) Error() string { |
| 217 | marshaled, err := json.Marshal(e) |
| 218 | if err != nil { |
| 219 | panic(err) |
| 220 | } |
| 221 | return string(marshaled) |
| 222 | |
| 223 | } |
| 224 | |
| 225 | // New returns an error that contains an error code and message derived from |
| 226 | // the given category, reason. Currently, to avoid confusion, it is not |
no outgoing calls