about summary refs log tree commit diff
path: root/tvix/eval/src/errors.rs
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2022-09-11T20·12+0300
committertazjin <tazjin@tvl.su>2022-09-11T21·13+0000
commit1844c788f557ff0f80943c127b727498676f04e4 (patch)
treee554092daf31095454a59acce8b6bfa47ccf596e /tvix/eval/src/errors.rs
parent0dc2b19ebeb9e0045328bc48fa369ae9de1a829b (diff)
refactor(tvix/eval): remove `todo!()` calls in compiler r/4823
It is impossible for tvixbolt to recover from panics, so the user
experience of typing an expression using an unsupported feature was
that it would get sad and stop responding to input.

Instead, raise a normal value-level error of a new variant and
continue where possible.

Change-Id: Ibe016c92cacb87b85095c0f83758eddc6468053e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6528
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
Diffstat (limited to 'tvix/eval/src/errors.rs')
-rw-r--r--tvix/eval/src/errors.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/tvix/eval/src/errors.rs b/tvix/eval/src/errors.rs
index ad4acd479e05..b87555d06d52 100644
--- a/tvix/eval/src/errors.rs
+++ b/tvix/eval/src/errors.rs
@@ -58,6 +58,11 @@ pub enum ErrorKind {
     /// An error occured while forcing a thunk, and needs to be
     /// chained up.
     ThunkForce(Box<Error>),
+
+    /// Tvix internal warning for features triggered by users that are
+    /// not actually implemented yet, and without which eval can not
+    /// proceed.
+    NotImplemented(&'static str),
 }
 
 #[derive(Clone, Debug)]