1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
use std::io;

use ignore;
use liquid;
use serde_json;
use serde_yaml;
use toml;
use walkdir;

error_chain! {

    links {
    }

    foreign_links {
        Io(io::Error);
        Liquid(liquid::Error);
        WalkDir(walkdir::Error);
        SerdeYaml(serde_yaml::Error);
        SerdeJson(serde_json::Error);
        Toml(toml::de::Error);
        Ignore(ignore::Error);
    }

    errors {
        ConfigFileMissingFields {
            description("missing fields in config file")
            display("name, description and link need to be defined in the config file to \
                    generate RSS")
        }

        UnsupportedPlatform(functionality: &'static str, platform: &'static str) {
            description("functionality is not implemented for this platform")
            display("{} is not implemented for the {} platform", functionality, platform)
        }
    }
}