about summary refs log tree commit diff
path: root/tvix/eval/src/errors.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/eval/src/errors.rs')
-rw-r--r--tvix/eval/src/errors.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/tvix/eval/src/errors.rs b/tvix/eval/src/errors.rs
index b59ee675dda4..0f17aafe8703 100644
--- a/tvix/eval/src/errors.rs
+++ b/tvix/eval/src/errors.rs
@@ -293,10 +293,11 @@ pub struct Error {
     pub kind: ErrorKind,
     pub span: Span,
     pub contexts: Vec<String>,
+    pub source: SourceCode,
 }
 
 impl Error {
-    pub fn new(mut kind: ErrorKind, span: Span) -> Self {
+    pub fn new(mut kind: ErrorKind, span: Span, source: SourceCode) -> Self {
         let mut contexts = vec![];
         while let ErrorKind::WithContext {
             context,
@@ -311,6 +312,7 @@ impl Error {
             kind,
             span,
             contexts,
+            source,
         }
     }
 }