ts-data-forge
    Preparing search index...

    Variable createPanicErrorConst

    createPanicError: (
        message: string,
        options?: Readonly<{ cause?: unknown }>,
    ) => PanicError

    Builds a fresh panic error. panic(message) throws what this returns; call it directly only when the error has to be produced without being thrown.

    Type Declaration

      • (message: string, options?: Readonly<{ cause?: unknown }>): PanicError
      • Parameters

        • message: string

          What went wrong.

        • Optionaloptions: Readonly<{ cause?: unknown }>

          cause: the underlying value, attached as Error.cause.

        Returns PanicError