Skip to content

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).

try {
parse("items: [1, 2");
} catch (err) {
if (err instanceof YAMLParseError) console.error(err.message);
}
  • Error

new YAMLParseError(message): YAMLParseError

Defined in: src/index.ts:158

string

YAMLParseError

Error.constructor

optional cause?: unknown

Defined in: site/node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2022.error.d.ts:24

Error.cause


message: string

Defined in: site/node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts:1075

Error.message


name: string

Defined in: site/node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts:1074

Error.name


optional stack?: string

Defined in: site/node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts:1076

Error.stack