MCPcopy Create free account
hub / github.com/Effect-TS/effect / error

Method error

packages/effect/src/encoding/Xml.ts:1458–1467  ·  view source on GitHub ↗
(kind: XmlError["kind"], message: string, at: number)

Source from the content-addressed store, hash-verified

1456 }
1457
1458 error(kind: XmlError["kind"], message: string, at: number): XmlError {
1459 if (at > this.counted) {
1460 // The parser is not used after an error, so `buf` can be replaced
1461 if (this.pending !== undefined) this.load(this.pending.join(""), this.pendingStart)
1462 this.count(at - this.base)
1463 }
1464 const line = this.line
1465 const column = at - this.lineStart + 1
1466 return new XmlError({ kind, message: `${message} at line ${line}, column ${column}`, line, column })
1467 }
1468
1469 // Advances the line count from `counted` to `to`, an index of `buf`.
1470 // Counting resumes only where parsing stopped, which is never between a CR

Callers 9

feedMethod · 0.95
endMethod · 0.95
syntaxMethod · 0.95
tokenLimitMethod · 0.95
referenceMethod · 0.95
startTagMethod · 0.95
openScopeMethod · 0.95
undeclaredMethod · 0.95
declarationMethod · 0.95

Calls 3

loadMethod · 0.95
countMethod · 0.95
joinMethod · 0.45

Tested by

no test coverage detected