Represents an SDL validation error. Extends the base ValidationError class.

Hierarchy (View Summary)

Constructors

Properties

message: string
name: string
stack?: string
prepareStackTrace?: (err: Error, stackTraces: CallSite[]) => any

Optional override for formatting stack traces

stackTraceLimit: number

Methods

  • Asserts a condition and throws an SdlValidationError if the condition is false.

    Parameters

    • condition: unknown

      The condition to assert.

    • message: string

      The error message to throw if the assertion fails.

    Returns asserts condition

    SdlValidationError.assert(someCondition, "Condition failed");
    
  • Create .stack property on a target object

    Parameters

    • targetObject: object
    • OptionalconstructorOpt: Function

    Returns void