about summary refs log tree commit diff
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2022-08-07T23·16+0300
committertazjin <tazjin@tvl.su>2022-08-12T13·24+0000
commite96a2934adadab633b6522367a4e1d768c8b5a87 (patch)
tree9f7b271d5cef13026c1eaa622191517b2f0b5d38
parente8253c70444a580d3b087a53118960d58fbe5984 (diff)
feat(tvix/eval): add error variant for runtime type errors r/4409
Change-Id: I74155cf01766b7a991a69522945bff67fbca5a16
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6073
Tested-by: BuildkiteCI
Reviewed-by: grfn <grfn@gws.fyi>
-rw-r--r--tvix/eval/src/errors.rs7
1 files changed, 6 insertions, 1 deletions
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 {