Class: UndefinedVariableError¶
Defined in: core/src/errors/template.ts:114
Error thrown when a template variable is used but not defined.
Example¶
Extends¶
Constructors¶
Constructor¶
new UndefinedVariableError(
variableName,sourceFile,options?):UndefinedVariableError
Defined in: core/src/errors/template.ts:120
Parameters¶
variableName¶
string
sourceFile¶
string
options?¶
location?¶
Returns¶
UndefinedVariableError
Overrides¶
Properties¶
cause?¶
readonlyoptionalcause:Error
Defined in: core/src/errors/base.ts:43
Original error if wrapping another error
Inherited from¶
code¶
readonlycode:string
Defined in: core/src/errors/base.ts:39
Error code
Inherited from¶
location?¶
readonlyoptionallocation:SourceLocation
Defined in: core/src/errors/base.ts:41
Source location where error occurred
Inherited from¶
sourceFile¶
readonlysourceFile:string
Defined in: core/src/errors/template.ts:118
File where the variable was used
variableName¶
readonlyvariableName:string
Defined in: core/src/errors/template.ts:116
Name of the undefined variable
Methods¶
format()¶
format():
string
Defined in: core/src/errors/base.ts:66
Format error for display.
Returns¶
string
Inherited from¶
toJSON()¶
toJSON():
Record\<string,unknown>
Defined in: core/src/errors/base.ts:79
Convert to JSON-serializable object.
Returns¶
Record\<string, unknown>