ParserError
Class: ParserError
Defined in: packages/tagscript/src/lib/Errors/index.ts:50
Wraps anything a parser threw that was not a TemplateError, which means a bug in the parser rather than a mistake in the template.
The interpreter renders GENERIC_PARSER_ERROR_MESSAGE instead of cause's message, so a
stack trace or an internal detail never reaches whoever reads the output. The real error is on
cause and the wrapper is pushed onto Response.errors.
Extends
Constructors
Constructor
new ParserError(tag, cause): ParserError
Defined in: packages/tagscript/src/lib/Errors/index.ts:58
Parameters
tag
string | null
cause
unknown
Returns
ParserError
Overrides
Properties
cause?
optional cause?: unknown
Defined in: node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es2022.error.d.ts:24
Inherited from
message
message: string
Defined in: node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts:1075
Inherited from
name
name: string = 'ParserError'
Defined in: packages/tagscript/src/lib/Errors/index.ts:51
Overrides
stack?
optional stack?: string
Defined in: node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts:1076
Inherited from
tag
readonly tag: string | null
Defined in: packages/tagscript/src/lib/Errors/index.ts:56
The declaration of the tag being processed when the parser threw.
Methods
isError()
static isError(error): error is Error
Defined in: node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/lib.esnext.error.d.ts:21
Indicates whether the argument provided is a built-in Error instance or not.
Parameters
error
unknown
Returns
error is Error