From e96a2934adadab633b6522367a4e1d768c8b5a87 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Mon, 8 Aug 2022 02:16:02 +0300 Subject: 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 --- tvix/eval/src/errors.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tvix/eval/src/errors.rs b/tvix/eval/src/errors.rs index 14f6819862..3df51acb6c 100644 --- a/tvix/eval/src/errors.rs +++ b/tvix/eval/src/errors.rs @@ -1,7 +1,12 @@ use std::fmt::Display; #[derive(Debug)] -pub struct Error {} +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 { -- cgit 1.4.1