use thiserror::Error;
#[derive(Error, Debug)]
pub enum BindGenError {
#[error("Could not read definitions directory {path}: {source}")]
CouldNotReadDefinitionsDirectory {
source: std::io::Error,
path: std::path::PathBuf,
},
#[error("Could not read definition file {path}: {source}")]
CouldNotReadDefinitionFile {
source: std::io::Error,
path: std::path::PathBuf,
},
#[error("Could not read MAVLink definitions directory entry {path}: {source}")]
CouldNotReadDirectoryEntryInDefinitionsDirectory {
source: std::io::Error,
path: std::path::PathBuf,
},
#[error("Could not create Rust bindings file {dest_path}: {source}")]
CouldNotCreateRustBindingsFile {
source: std::io::Error,
dest_path: std::path::PathBuf,
},
}