include_graph/dependencies/
error.rs

1use std::path::PathBuf;
2
3use tokio::task::JoinError;
4
5#[derive(thiserror::Error, Debug)]
6pub enum Error {
7    #[error("I/O error at path {}: {}", path.to_string_lossy(), message)]
8    IOError {
9        #[source]
10        source: std::io::Error,
11        path: PathBuf,
12        message: &'static str,
13    },
14
15    #[error("I/O error: {}", message)]
16    AsyncIOError {
17        #[source]
18        source: tokio::io::Error,
19        message: &'static str,
20    },
21
22    #[error("Terra render error")]
23    RenderError(tera::Error),
24
25    #[error("Failed to parse JSON")]
26    JsonParseError(serde_json::Error),
27
28    #[error("Subtask join error")]
29    JoinError(JoinError),
30
31    #[error("Internal error")]
32    Internal { message: String },
33
34    #[error("Error parsing a config file (nom error)")]
35    ConfigParseError { message: String },
36}