Skip to content

Game.Modding.Toolchain.ToolchainError

Assembly: Assembly-CSharp (typical; replace with actual assembly if different)
Namespace: Game.Modding.Toolchain

Type: enum

Base: System.Enum

Summary: Represents the kinds of errors that can occur within the modding toolchain (e.g., when downloading, installing, or uninstalling content, or when there is insufficient disk space). Use this enum to classify and handle toolchain failures in UI messages, logs, or retry logic.


Fields

  • NotEnoughSpace
    Indicates an operation failed because the target device or partition does not have enough free disk space to complete the action (typically during installation).

  • Download
    Indicates a failure occurred while downloading required data (network error, timeout, corrupted transfer, etc.).

  • Install
    Indicates an error occurred during the installation process (file write error, permission denied, invalid package, etc.).

  • Uninstall
    Indicates an error occurred while uninstalling/removing content (file locked, missing files, permission issues, etc.).

Properties

  • This enum type exposes no properties. It's a simple value type used to represent discrete error kinds.

Constructors

  • Enums do not have accessible constructors in user code. Each member is a named constant with the underlying integral value provided by the runtime.

Methods

  • No custom methods are defined on this enum. You can use standard Enum APIs (e.g., Enum.ToString, Enum.Parse, Enum.TryParse) where needed.

Usage Example

void HandleToolchainError(ToolchainError error)
{
    switch (error)
    {
        case ToolchainError.NotEnoughSpace:
            Debug.LogError("Not enough disk space to complete the operation.");
            // Prompt user to free space or choose another drive
            break;
        case ToolchainError.Download:
            Debug.LogError("Download failed. Check network connection and try again.");
            // Maybe retry download or show network diagnostics
            break;
        case ToolchainError.Install:
            Debug.LogError("Installation failed. Check package integrity and permissions.");
            // Rollback or cleanup
            break;
        case ToolchainError.Uninstall:
            Debug.LogError("Uninstall failed. Check file locks and permissions.");
            // Inform user or attempt alternative removal
            break;
        default:
            Debug.LogError($"Unknown toolchain error: {error}");
            break;
    }
}