1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#[cfg(feature = "android")]
use crossbundle_tools::types::android_manifest;
use displaydoc::Display;
use thiserror::Error;
pub type Result<T> = std::result::Result<T, Error>;
#[derive(Display, Debug, Error)]
pub enum Error {
CantFindTargetToRun,
TeamIdentifierNotProvided,
InvalidMetadata(anyhow::Error),
Io(#[from] std::io::Error),
Clap(#[from] clap::Error),
AnyhowError(#[from] anyhow::Error),
CrossbundleTools(#[from] crossbundle_tools::error::Error),
#[cfg(feature = "android")]
AndroidManifest(#[from] android_manifest::error::Error),
FsExtra(#[from] fs_extra::error::Error),
PathNotFound(std::path::PathBuf),
HomeDirNotFound,
DownloadFailed(ureq::Error),
JarFileCreationFailed {
path: std::path::PathBuf,
cause: std::io::Error,
},
CopyToFileFailed {
path: std::path::PathBuf,
cause: std::io::Error,
},
}
#[cfg(feature = "android")]
impl From<crossbundle_tools::types::AndroidToolsError> for Error {
fn from(error: crossbundle_tools::types::AndroidToolsError) -> Self {
Error::CrossbundleTools(error.into())
}
}