Hammond-data: switch database module to use Failure.
This commit is contained in:
@@ -15,6 +15,8 @@ use errors::*;
|
||||
use hammond_data::{EpisodeWidgetQuery, PodcastCoverQuery, Save};
|
||||
use hammond_data::xdg_dirs::HAMMOND_CACHE;
|
||||
|
||||
// use failure::Error;
|
||||
|
||||
// TODO: Replace path that are of type &str with std::path.
|
||||
// TODO: Have a convention/document absolute/relative paths, if they should end with / or not.
|
||||
|
||||
|
||||
@@ -9,3 +9,12 @@ error_chain! {
|
||||
DataError(hammond_data::errors::Error);
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Fail, Debug)]
|
||||
enum DownloaderError {
|
||||
#[fail(display = "Reqwest error: {}", _0)] RequestError(reqwest::Error),
|
||||
// NOT SYNC.
|
||||
// #[fail(display = "Data error: {}", _0)]
|
||||
// DataError(hammond_data::errors::Error),
|
||||
#[fail(display = "Io error: {}", _0)] IoError(io::Error),
|
||||
}
|
||||
|
||||
@@ -1,13 +1,17 @@
|
||||
#![recursion_limit = "1024"]
|
||||
#![deny(unused_extern_crates, unused)]
|
||||
// #![deny(unused_extern_crates, unused)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate error_chain;
|
||||
#[macro_use]
|
||||
extern crate failure_derive;
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
|
||||
extern crate failure;
|
||||
extern crate glob;
|
||||
extern crate hammond_data;
|
||||
extern crate hyper;
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
extern crate mime_guess;
|
||||
extern crate reqwest;
|
||||
extern crate tempdir;
|
||||
|
||||
Reference in New Issue
Block a user