refactor: reduce coupling
This commit is contained in:
7
evaluator/nixjit_error/Cargo.toml
Normal file
7
evaluator/nixjit_error/Cargo.toml
Normal file
@@ -0,0 +1,7 @@
|
||||
[package]
|
||||
name = "nixjit_error"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
|
||||
[dependencies]
|
||||
thiserror = "2.0"
|
||||
17
evaluator/nixjit_error/src/lib.rs
Normal file
17
evaluator/nixjit_error/src/lib.rs
Normal file
@@ -0,0 +1,17 @@
|
||||
use thiserror::Error;
|
||||
|
||||
pub type Result<T> = core::result::Result<T, Error>;
|
||||
|
||||
#[derive(Error, Debug)]
|
||||
pub enum Error {
|
||||
#[error("error occurred during parse stage: {0}")]
|
||||
ParseError(String),
|
||||
#[error("error occurred during downgrade stage: {0}")]
|
||||
DowngradeError(String),
|
||||
#[error("error occurred during variable resolve stage: {0}")]
|
||||
ResolutionError(String),
|
||||
#[error("error occurred during evaluation stage: {0}")]
|
||||
EvalError(String),
|
||||
#[error("unknown error")]
|
||||
Unknown,
|
||||
}
|
||||
Reference in New Issue
Block a user