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
38
39
40
41
42
43
44
45
46
47
pub mod config;
pub mod exec;
pub mod export;
mod io;
pub mod redact;
pub mod scan;
pub mod teller;
pub mod template;

use std::string::FromUtf8Error;

#[derive(thiserror::Error, Debug)]
pub enum Error {
    #[error("{0}")]
    Message(String),

    #[error(transparent)]
    Shellwords(#[from] shell_words::ParseError),

    #[error(transparent)]
    IO(#[from] std::io::Error),

    #[error(transparent)]
    Provider(#[from] teller_providers::Error),

    #[error(transparent)]
    Handlebars(Box<dyn std::error::Error + Send + Sync>),

    #[error(transparent)]
    Json(#[from] serde_json::Error),

    #[error(transparent)]
    YAML(#[from] serde_yaml::Error),

    #[error(transparent)]
    CSV(#[from] csv::Error),

    #[error(transparent)]
    CSVInner(Box<dyn std::error::Error + Send + Sync>),

    #[error(transparent)]
    Tera(#[from] tera::Error),

    #[error(transparent)]
    Utf(#[from] FromUtf8Error),
}
pub type Result<T, E = Error> = std::result::Result<T, E>;