MCPcopy Create free account
hub / github.com/bcicen/jstream / mkError

Method mkError

decoder.go:646–655  ·  view source on GitHub ↗

create syntax errors at current position, with optional context

(err DecoderError, context ...string)

Source from the content-addressed store, hash-verified

644
645// create syntax errors at current position, with optional context
646func (d *Decoder) mkError(err DecoderError, context ...string) error {
647 if len(context) > 0 {
648 err.context = context[0]
649 }
650 err.atChar = d.cur()
651 err.pos[0] = d.lineNo + 1
652 err.pos[1] = int(d.pos - d.lineStart)
653 err.readerErr = d.readerErr
654 return err
655}

Callers 7

emitAnyMethod · 0.95
anyMethod · 0.95
stringMethod · 0.95
numberMethod · 0.95
arrayMethod · 0.95
objectMethod · 0.95
objectOrderedMethod · 0.95

Calls 1

curMethod · 0.80

Tested by

no test coverage detected