|
@@ -6,6 +6,7 @@ use ffsend_api::action::upload::Error as UploadError;
|
|
use ffsend_api::file::remote_file::FileParseError;
|
|
use ffsend_api::file::remote_file::FileParseError;
|
|
|
|
|
|
use action::download::Error as CliDownloadError;
|
|
use action::download::Error as CliDownloadError;
|
|
|
|
+use action::history::Error as CliHistoryError;
|
|
use action::info::Error as CliInfoError;
|
|
use action::info::Error as CliInfoError;
|
|
|
|
|
|
#[derive(Fail, Debug)]
|
|
#[derive(Fail, Debug)]
|
|
@@ -47,6 +48,10 @@ pub enum ActionError {
|
|
#[fail(display = "Failed to check whether the file exists")]
|
|
#[fail(display = "Failed to check whether the file exists")]
|
|
Exists(#[cause] ExistsError),
|
|
Exists(#[cause] ExistsError),
|
|
|
|
|
|
|
|
+ /// An error occurred while processing the file history.
|
|
|
|
+ #[fail(display = "Failed to process the history")]
|
|
|
|
+ History(#[cause] CliHistoryError),
|
|
|
|
+
|
|
/// An error occurred while invoking the info action.
|
|
/// An error occurred while invoking the info action.
|
|
#[fail(display = "Failed to fetch file info")]
|
|
#[fail(display = "Failed to fetch file info")]
|
|
Info(#[cause] CliInfoError),
|
|
Info(#[cause] CliInfoError),
|
|
@@ -82,6 +87,12 @@ impl From<ExistsError> for ActionError {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+impl From<CliHistoryError> for ActionError {
|
|
|
|
+ fn from(err: CliHistoryError) -> ActionError {
|
|
|
|
+ ActionError::History(err)
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
impl From<ParamsError> for ActionError {
|
|
impl From<ParamsError> for ActionError {
|
|
fn from(err: ParamsError) -> ActionError {
|
|
fn from(err: ParamsError) -> ActionError {
|
|
ActionError::Params(err)
|
|
ActionError::Params(err)
|