Represents a generic validation error. Extends the native Error class.
Error
Creates an instance of ValidationError.
ValidationError
The error message.
Optional
Static
Optional override for formatting stack traces
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Asserts a condition and throws a ValidationError if the condition is false.
The condition to assert.
The error message to throw if the assertion fails.
ValidationError.assert(someCondition, "Condition failed"); Copy
ValidationError.assert(someCondition, "Condition failed");
Create .stack property on a target object
Represents a generic validation error. Extends the native
Error
class.