about summary refs log tree commit diff
path: root/tvix/eval/src/eval.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/eval/src/eval.rs')
-rw-r--r--tvix/eval/src/eval.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/tvix/eval/src/eval.rs b/tvix/eval/src/eval.rs
index 8f2946e6cc84..10d36904e4b4 100644
--- a/tvix/eval/src/eval.rs
+++ b/tvix/eval/src/eval.rs
@@ -41,5 +41,13 @@ pub fn interpret(code: &str, location: Option<PathBuf>) -> EvalResult<Value> {
         )
     }
 
+    for error in &result.errors {
+        eprintln!("compiler error: {:?} at {:?}", error.kind, error.node,);
+    }
+
+    if let Some(err) = result.errors.last() {
+        return Err(err.clone());
+    }
+
     crate::vm::run_chunk(result.chunk)
 }