ClipErrorGenerator: {
    <TError>(error: TError): TError;
    <TError>(ErrorClass: (new (message: string) => TError), msg: string, elementOverride?: DOMElement): TError;
}

Function that throws detailed error using additional location information based on AnimClip, its target DOM element, its parent AnimSequence, and its parent AnimTimeline.

Type declaration

    • <TError>(error): TError
    • If an Error instance is passed, the location is appended to it.

      Type Parameters

      Parameters

      • error: TError

        The Error instance to attach the location information to

      Returns TError

    • <TError>(ErrorClass, msg, elementOverride?): TError
    • If an Error class function is passed, it is used to create an Error instance with the msg parameter as the error message.

      Type Parameters

      Parameters

      • ErrorClass: (new (message: string) => TError)

        The Error class that will be instantiated

          • new (message): TError
          • Parameters

            • message: string

            Returns TError

      • msg: string

        The error message that will appear before the location information

      • OptionalelementOverride: DOMElement

        Used to explicitly set the DOM elem in the edgecase where the error occurs in the clip's constructor (where the field containing the DOM element is not yet set)

      Returns TError