2024-06-09 10:21:09 +01:00
|
|
|
//
|
|
|
|
pub type Result<T> = core::result::Result<T, Error>;
|
|
|
|
|
2024-06-03 08:04:48 +01:00
|
|
|
#[derive(Debug, thiserror::Error)]
|
2024-05-03 17:50:50 +01:00
|
|
|
pub enum Error {
|
2024-06-03 08:04:48 +01:00
|
|
|
#[error("unable to open repo: {0}")]
|
2024-05-18 11:41:18 +01:00
|
|
|
UnableToOpenRepo(String),
|
2024-06-03 08:04:48 +01:00
|
|
|
|
|
|
|
#[error("no remote found")]
|
2024-05-03 17:50:50 +01:00
|
|
|
NoFetchRemoteFound,
|
2024-06-03 08:04:48 +01:00
|
|
|
|
|
|
|
#[error("remote connect: {0}")]
|
2024-05-18 11:41:18 +01:00
|
|
|
Connect(String),
|
2024-05-19 20:02:06 +01:00
|
|
|
|
2024-06-03 08:04:48 +01:00
|
|
|
#[error("prepare: {0}")]
|
|
|
|
Prepare(String),
|
|
|
|
|
|
|
|
#[error("receive: {0}")]
|
|
|
|
Receive(String),
|
2024-05-19 20:02:06 +01:00
|
|
|
|
2024-06-03 08:04:48 +01:00
|
|
|
#[error("lock")]
|
|
|
|
Lock,
|
2024-06-09 10:21:09 +01:00
|
|
|
|
|
|
|
#[cfg(test)]
|
|
|
|
#[error("expected failure in test")]
|
|
|
|
TestFailureExpected,
|
|
|
|
|
|
|
|
#[cfg(test)]
|
|
|
|
#[error("test")]
|
|
|
|
TestResult(#[from] Box<dyn std::error::Error>),
|
2024-05-19 20:02:06 +01:00
|
|
|
}
|