Skip to main content

stout_bundle/
error.rs

1//! Error types for stout-bundle
2
3use thiserror::Error;
4
5pub type Result<T> = std::result::Result<T, Error>;
6
7#[derive(Error, Debug)]
8pub enum Error {
9    #[error("Brewfile not found: {0}")]
10    BrewfileNotFound(String),
11
12    #[error("Parse error: {0}")]
13    ParseError(String),
14
15    #[error("Ruby parse error: {0}")]
16    RubyError(String),
17
18    #[error("Snapshot error: {0}")]
19    SnapshotError(String),
20
21    #[error("Snapshot not found: {0}")]
22    SnapshotNotFound(String),
23
24    #[error("IO error: {0}")]
25    Io(#[from] std::io::Error),
26
27    #[error("JSON error: {0}")]
28    Json(#[from] serde_json::Error),
29}