tvl-depot/tvix/eval/src/errors.rs
Vincent Ambo e96a2934ad feat(tvix/eval): add error variant for runtime type errors
Change-Id: I74155cf01766b7a991a69522945bff67fbca5a16
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6073
Tested-by: BuildkiteCI
Reviewed-by: grfn <grfn@gws.fyi>
2022-08-12 13:24:10 +00:00

17 lines
325 B
Rust

use std::fmt::Display;
#[derive(Debug)]
pub enum Error {
TypeError {
expected: &'static str,
actual: &'static str,
},
}
impl Display for Error {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
writeln!(f, "error")
}
}
pub type EvalResult<T> = Result<T, Error>;