saveError saves the first err it is called with, for reporting at the end of the unmarshal.
(err error)
| 310 | // saveError saves the first err it is called with, |
| 311 | // for reporting at the end of the unmarshal. |
| 312 | func (d *decodeState) saveError(err error) { |
| 313 | if d.savedError == nil { |
| 314 | d.savedError = d.addErrorContext(err) |
| 315 | } |
| 316 | } |
| 317 | |
| 318 | // addErrorContext returns a new error enhanced with information from d.errorContext |
| 319 | func (d *decodeState) addErrorContext(err error) error { |
no test coverage detected