genshin-manager
    Preparing search index...

    Variable AssetErrorFactoryConst

    AssetErrorFactory: {
        createAudioError(
            audioPath: string,
            failureType: "not_found" | "corrupted" | "download_failed",
            details?: {
                cause?: Error;
                context?: ErrorContext;
                corruptionDetails?: string;
                downloadUrl?: string;
                statusCode?: number;
            },
        ): AssetError;
        createFromFailure(
            assetPath: string,
            assetType: string,
            failureType: "not_found" | "corrupted" | "download_failed",
            details?: {
                cause?: Error;
                context?: ErrorContext;
                corruptionDetails?: string;
                downloadUrl?: string;
                statusCode?: number;
            },
        ): AssetError;
        createImageError(
            imagePath: string,
            failureType: "not_found" | "corrupted" | "download_failed",
            details?: {
                cause?: Error;
                context?: ErrorContext;
                corruptionDetails?: string;
                downloadUrl?: string;
                statusCode?: number;
            },
        ): AssetError;
    } = ...

    Factory for creating asset errors

    Type declaration

    • createAudioError: function
      • Create audio-specific error

        Parameters

        • audioPath: string
        • failureType: "not_found" | "corrupted" | "download_failed"
        • Optionaldetails: {
              cause?: Error;
              context?: ErrorContext;
              corruptionDetails?: string;
              downloadUrl?: string;
              statusCode?: number;
          }

        Returns AssetError

    • createFromFailure: function
      • Create asset error based on the type of failure

        Parameters

        • assetPath: string
        • assetType: string
        • failureType: "not_found" | "corrupted" | "download_failed"
        • Optionaldetails: {
              cause?: Error;
              context?: ErrorContext;
              corruptionDetails?: string;
              downloadUrl?: string;
              statusCode?: number;
          }

        Returns AssetError

    • createImageError: function
      • Create image-specific error

        Parameters

        • imagePath: string
        • failureType: "not_found" | "corrupted" | "download_failed"
        • Optionaldetails: {
              cause?: Error;
              context?: ErrorContext;
              corruptionDetails?: string;
              downloadUrl?: string;
              statusCode?: number;
          }

        Returns AssetError