MCPcopy Create free account
hub / github.com/evanphx/json-patch / saveError

Method saveError

v5/internal/json/decode.go:312–316  ·  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

310// saveError saves the first err it is called with,
311// for reporting at the end of the unmarshal.
312func (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
319func (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