MCPcopy Create free account
hub / github.com/blues/note / saveError

Method saveError

jsonxt/decode.go:297–301  ·  view source on GitHub ↗

saveError saves the first err it is called with, for reporting at the end of the unmarshal.

(err error)

Source from the content-addressed store, hash-verified

295// saveError saves the first err it is called with,
296// for reporting at the end of the unmarshal.
297func (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
304func (d *decodeState) addErrorContext(err error) error {

Callers 4

arrayMethod · 0.95
objectMethod · 0.95
literalStoreMethod · 0.95
literalInterfaceMethod · 0.95

Calls 1

addErrorContextMethod · 0.95

Tested by

no test coverage detected