gradle_sync/error.rs
1use std::io::Error as IoError;
2
3#[derive(PartialEq, Eq, Debug, Clone)]
4pub enum Error {
5 ParsingFailed(String),
6 VersionNotFound(String),
7 VersionNotIncreasing(String),
8 IoError(String),
9}
10
11pub type GradleResult<T> = Result<T, Error>;
12
13impl From<IoError> for Error {
14 fn from(io_error: IoError) -> Error {
15 let reason = format!("failed to read line: {:?}", io_error);
16 Error::IoError(reason)
17 }
18}