MCPcopy Create free account
hub / github.com/go-json-experiment/json / wrapSyntacticError

Function wrapSyntacticError

jsontext/errors.go:74–118  ·  view source on GitHub ↗

wrapSyntacticError wraps an error and annotates it with a precise location using the provided [encoderState] or [decoderState]. If err is an [ioError] or [io.EOF], then it is not wrapped. It takes a relative offset pos that can be resolved into an absolute offset using state.offsetAt. It takes a w

(state interface {
	options() *jsonopts.Struct
	offsetAt(pos int) int64
	AppendStackPointer(b []byte, where int) []byte
}, err error, pos, where int)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 9

WriteTokenMethod · 0.85
AppendRawMethod · 0.85
WriteValueMethod · 0.85
PeekKindMethod · 0.85
checkDelimMethod · 0.85
ReadTokenMethod · 0.85
ReadValueMethod · 0.85
CheckNextValueMethod · 0.85
checkEOFMethod · 0.85

Calls 11

NewInvalidCharacterErrorFunction · 0.92
PointerTypeAlias · 0.85
appendPointerMethod · 0.80
LengthMethod · 0.80
isArrayMethod · 0.80
ParentMethod · 0.80
isObjectMethod · 0.80
GetMethod · 0.80
offsetAtMethod · 0.45
AppendStackPointerMethod · 0.45
optionsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…