YAMLParseError
Defined in: src/index.ts:157
Thrown by parse / parseAll when the input is not well-formed
YAML (or violates a parse constraint). The message includes the 1-based line
and column of the problem, rendered as … (line L, column C).
Example
Section titled “Example”try { parse("items: [1, 2");} catch (err) { if (err instanceof YAMLParseError) console.error(err.message);}Extends
Section titled “Extends”Error
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new YAMLParseError(
message):YAMLParseError
Defined in: src/index.ts:158
Parameters
Section titled “Parameters”message
Section titled “message”string
Returns
Section titled “Returns”YAMLParseError
Overrides
Section titled “Overrides”Error.constructor
Properties
Section titled “Properties”cause?
Section titled “cause?”
optionalcause?:unknown
Defined in: site/node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2022.error.d.ts:24
Inherited from
Section titled “Inherited from”Error.cause
message
Section titled “message”message:
string
Defined in: site/node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts:1075
Inherited from
Section titled “Inherited from”Error.message
name:
string
Defined in: site/node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts:1074
Inherited from
Section titled “Inherited from”Error.name
stack?
Section titled “stack?”
optionalstack?:string
Defined in: site/node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts:1076
Inherited from
Section titled “Inherited from”Error.stack