1use thiserror::Error;
2
3#[derive(Error, Debug)]
4pub enum BindGenError {
5 #[error("Could not read definitions directory {}: {source}", path.display())]
7 CouldNotReadDefinitionsDirectory {
8 source: std::io::Error,
9 path: std::path::PathBuf,
10 },
11 #[error("Could not read definition file {}: {source}", path.display())]
13 CouldNotReadDefinitionFile {
14 source: std::io::Error,
15 path: std::path::PathBuf,
16 },
17 #[error("Could not read MAVLink definitions directory entry {}: {source}", path.display())]
19 CouldNotReadDirectoryEntryInDefinitionsDirectory {
20 source: std::io::Error,
21 path: std::path::PathBuf,
22 },
23 #[error("Could not create Rust bindings file {}: {source}", dest_path.display())]
25 CouldNotCreateRustBindingsFile {
26 source: std::io::Error,
27 dest_path: std::path::PathBuf,
28 },
29}