Documentation / @facturometro/einvoice / XmlSyntaxError
Class: XmlSyntaxError ​
Defined in: packages/core/src/errors.ts:67
The document is not well-formed XML.
Wraps the underlying parser failure (available as cause) and points at the offending position in the source text.
Example ​
import { XmlSyntaxError } from '@facturometro/core';
throw new XmlSyntaxError('Missing end tag.', { column: 12, excerpt: '<cbc:ID>INV-1', line: 3 });Extends ​
Constructors ​
Constructor ​
new XmlSyntaxError(
message,position,options?):XmlSyntaxError
Defined in: packages/core/src/errors.ts:89
Creates an XML syntax error.
Parameters ​
message ​
string
Description of the syntax problem, kept verbatim.
position ​
Where the document broke, and the source text around it.
column ​
number
1-based column of the syntax error.
excerpt ​
string
Source text around the syntax error.
line ​
number
1-based line of the syntax error.
options? ​
ErrorOptions
Standard error options, in particular cause.
Returns ​
XmlSyntaxError
Overrides ​
Properties ​
cause? ​
optionalcause?:unknown
Defined in: node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2022.error.d.ts:24
Inherited from ​
code ​
readonlycode:"EINV-XML-SYNTAX"
Defined in: packages/core/src/errors.ts:68
Stable, machine-readable identifier of the failure.
Overrides ​
column ​
readonlycolumn:number
Defined in: packages/core/src/errors.ts:71
1-based column of the syntax error.
excerpt ​
readonlyexcerpt:string
Defined in: packages/core/src/errors.ts:74
Source text around the syntax error, for error messages.
line ​
readonlyline:number
Defined in: packages/core/src/errors.ts:77
1-based line of the syntax error.
message ​
message:
string
Defined in: node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts:1075
Inherited from ​
name ​
name:
string
Defined in: node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts:1074
Inherited from ​
stack? ​
optionalstack?:string
Defined in: node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts:1076