workspacer_bump/
error.rs

1// ---------------- [ File: workspacer-bump/src/error.rs ]
2crate::ix!();
3
4//------------------------------------------------------------------
5// Example errors for the "workspace-bump" crate
6//------------------------------------------------------------------
7error_tree!{
8    pub enum BumpVersionsError {
9        // I/O error reading or writing Cargo.toml
10        IoError {
11            context: String,
12            io_error: Arc<std::io::Error>,
13        },
14        // Could not parse the Cargo.toml
15        CargoTomlParseError {
16            path: PathBuf,
17            details: String,
18        },
19        // Missing [package] or version field
20        MissingPackageSection {
21            path: PathBuf,
22        },
23        // The version string was invalid semver
24        InvalidVersion {
25            path:        PathBuf,
26            version_str: String,
27            details:     String,
28        },
29        // We tried to bump a crate that doesn't exist
30        NoSuchCrate {
31            crate_name: String,
32        },
33    }
34}