Skip to main content

edgecrab_plugins/
error.rs

1use std::path::PathBuf;
2
3#[derive(Debug, thiserror::Error)]
4pub enum PluginError {
5    #[error("plugin manifest missing at {path}")]
6    MissingManifest { path: PathBuf },
7    #[error("invalid plugin manifest {path}: {message}")]
8    InvalidManifest { path: PathBuf, message: String },
9    #[error("invalid skill manifest {path}: {message}")]
10    InvalidSkill { path: PathBuf, message: String },
11    #[error("plugin process error: {0}")]
12    Process(String),
13    #[error("plugin rpc error: {0}")]
14    Rpc(String),
15    #[error("plugin hub error: {0}")]
16    Hub(String),
17    #[error("script error: {0}")]
18    Script(String),
19    #[error("io error: {0}")]
20    Io(#[from] std::io::Error),
21    #[error("json error: {0}")]
22    Json(#[from] serde_json::Error),
23    #[error("toml error: {0}")]
24    Toml(#[from] toml::de::Error),
25}