1use std::path::PathBuf;
2
3use crate::package::StorePath;
4
5error_chain::error_chain! {
6 errors {
7 QueryPackages {
8 description("query packages error")
9 display("querying available packages failed")
10 }
11 FetchFiles(path: StorePath) {
12 description("file listing fetch error")
13 display("fetching the file listing for store path '{}' failed", path.as_str())
14 }
15 FetchReferences(path: StorePath) {
16 description("references fetch error")
17 display("fetching the references of store path '{}' failed", path.as_str())
18 }
19 LoadPathsCache {
20 description("paths.cache load error")
21 display("loading the paths.cache file failed")
22 }
23 WritePathsCache {
24 description("paths.cache write error")
25 display("writing the paths.cache file failed")
26 }
27 CreateDatabase(path: PathBuf) {
28 description("crate database error")
29 display("creating the database at '{}' failed", path.to_string_lossy())
30 }
31 CreateDatabaseDir(path: PathBuf) {
32 description("crate database directory error")
33 display("creating the directory for the database at '{}' failed", path.to_string_lossy())
34 }
35 WriteDatabase(path: PathBuf) {
36 description("database write error")
37 display("writing to the database '{}' failed", path.to_string_lossy())
38 }
39 ParseProxy(err: crate::hydra::Error){
40 description("proxy parse error")
41 display("Can not parse proxy settings")
42 }
43 }
44}