saveError saves the first err it is called with, for reporting at the end of the unmarshal.
(err error)
| 295 | // saveError saves the first err it is called with, |
| 296 | // for reporting at the end of the unmarshal. |
| 297 | func (d *decodeState) saveError(err error) { |
| 298 | if d.savedError == nil { |
| 299 | d.savedError = d.addErrorContext(err) |
| 300 | } |
| 301 | } |
| 302 | |
| 303 | // addErrorContext returns a new error enhanced with information from d.errorContext |
| 304 | func (d *decodeState) addErrorContext(err error) error { |
no test coverage detected