amalgam_codegen/
error.rs

1use thiserror::Error;
2
3#[derive(Error, Debug)]
4pub enum CodegenError {
5    #[error("Code generation error: {0}")]
6    Generation(String),
7
8    #[error("Unsupported type: {0}")]
9    UnsupportedType(String),
10
11    #[error("Invalid IR: {0}")]
12    InvalidIR(String),
13
14    #[error("IO error: {0}")]
15    Io(#[from] std::io::Error),
16
17    #[error("Format error: {0}")]
18    Fmt(#[from] std::fmt::Error),
19}