ValidationError
Defined in: core/src/errors/validate.ts:12
Error during validation phase.
Extends
Constructors
Constructor
new ValidationError(
message,ruleId,options?):ValidationError
Defined in: core/src/errors/validate.ts:20
Parameters
message
string
ruleId
string
options?
location?
severity?
suggestion?
string
Returns
ValidationError
Overrides
Properties
cause?
readonlyoptionalcause?:Error
Defined in: core/src/errors/base.ts:56
Original error if wrapping another error
Inherited from
code
readonlycode:string
Defined in: core/src/errors/base.ts:52
Error code
Inherited from
location?
readonlyoptionallocation?:SourceLocation
Defined in: core/src/errors/base.ts:54
Source location where error occurred
Inherited from
ruleId
readonlyruleId:string
Defined in: core/src/errors/validate.ts:14
Validation rule ID
severity
readonlyseverity:Severity
Defined in: core/src/errors/validate.ts:16
Severity level
suggestion?
readonlyoptionalsuggestion?:string
Defined in: core/src/errors/validate.ts:18
Suggestion for fixing
Methods
format()
format():
string
Defined in: core/src/errors/validate.ts:38
Format error for display.
Returns
string
Overrides
toJSON()
toJSON():
Record<string,unknown>
Defined in: core/src/errors/base.ts:92
Convert to JSON-serializable object.
Returns
Record<string, unknown>