Creates a detailed Error containing information about the structures involved in the error along with the error message.

  • Type Parameters

    Parameters

    • ErrorClassOrInstance: TError | (new (message: string) => TError)

      The Error instance (or Error class to be instantiated) to be thrown.

    • msg: string

      Error message describing the issue

    • Optionalcomponents: {
          clip?: AnimClip<Readonly<StripDuplicateMethodAutocompletion<{
              defaultConfig?: Partial<unknown>;
              effectCompositionFrequency?: "on-first-play-only" | "on-every-play";
              immutableConfig?: Partial<unknown>;
              composeEffect(...effectOptions: unknown[]): StripDuplicateMethodAutocompletion<{
                  backwardKeyframesGenerator?: (() => ...);
                  backwardMutatorGenerator?: (() => ...);
                  forwardKeyframesGenerator?: (() => ...);
                  forwardMutatorGenerator?: (() => ...);
                  reverseKeyframesEffect?: boolean;
                  reverseMutatorEffect?: boolean;
              }>;
          }>>, AnimClipConfig>;
          element?: DOMElement;
          sequence?: AnimSequence;
          timeline?: AnimTimeline;
      }

      The structures whose details should be appended to msg

      • Optionalclip?: AnimClip<Readonly<StripDuplicateMethodAutocompletion<{
            defaultConfig?: Partial<unknown>;
            effectCompositionFrequency?: "on-first-play-only" | "on-every-play";
            immutableConfig?: Partial<unknown>;
            composeEffect(...effectOptions: unknown[]): StripDuplicateMethodAutocompletion<{
                backwardKeyframesGenerator?: (() => ...);
                backwardMutatorGenerator?: (() => ...);
                forwardKeyframesGenerator?: (() => ...);
                forwardMutatorGenerator?: (() => ...);
                reverseKeyframesEffect?: boolean;
                reverseMutatorEffect?: boolean;
            }>;
        }>>, AnimClipConfig>

        The AnimClip involved in the error

      • Optionalelement?: DOMElement

        The DOM element involved in the error

      • Optionalsequence?: AnimSequence

        The AnimSequence involved in the error

      • Optionaltimeline?: AnimTimeline

        The AnimTimeline involved in the error

    Returns TError

    An Error containing details about where exactly in the timeline and/or sequence and/or clip the error occured.