1use thiserror::Error;
2use thiserror_context::impl_context;
3use unity_hub::unity::error::UnityError;
4use uvm_live_platform::error::LivePlatformError;
5use crate::install;
6
7pub type Result<T> = std::result::Result<T, InstallError>;
8
9#[derive(Error, Debug)]
10pub enum InstallError {
11 #[error("Failed to load Unity release")]
12 ReleaseLoadFailure(#[from] LivePlatformError),
13
14 #[error("Unable to lock install process")]
15 LockProcessFailure(#[from] std::io::Error),
16
17 #[error("Unable to load installation")]
18 UnityError(#[from] UnityError),
19
20 #[error("Module '{0}' not supported for version '{1}'")]
21 UnsupportedModule(String, String),
22
23 #[error("Loading installer failed: {0}")]
24 LoadingInstallerFailed(#[source] install::error::InstallerError),
25
26 #[error("failed to created installer: {0}")]
27 InstallerCreatedFailed(#[source] install::error::InstallerError),
28
29 #[error("Installation failed for module {0}: {1}")]
30 InstallFailed(String, #[source] install::error::InstallerError),
31
32 #[error("Some Hub error")]
33 HubError(#[from]unity_hub::error::UnityHubError),
34}
35
36