diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-09-20 19:49:47 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-09-20 19:49:47 +0200 |
| commit | 3760748fddd3b793c79c370398a9d4a3fc5afc04 (patch) | |
| tree | b1a615e510aa231cfe9757a9c0a35a375e32e3ba /src/eval/vm.rs | |
| parent | 757a701c1aa2a6fb80033c7e75666661818da6f9 (diff) | |
Refactor error handling
Diffstat (limited to 'src/eval/vm.rs')
| -rw-r--r-- | src/eval/vm.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/eval/vm.rs b/src/eval/vm.rs index 937152cf..7c8e8e31 100644 --- a/src/eval/vm.rs +++ b/src/eval/vm.rs @@ -1,7 +1,7 @@ use std::path::PathBuf; use super::{Scopes, Value}; -use crate::diag::{StrResult, TypError}; +use crate::diag::{SourceError, StrResult}; use crate::source::SourceId; use crate::syntax::Span; use crate::util::PathExt; @@ -56,7 +56,7 @@ pub enum Flow { impl Flow { /// Return an error stating that this control flow is forbidden. - pub fn forbidden(&self) -> TypError { + pub fn forbidden(&self) -> SourceError { match *self { Self::Break(span) => { error!(span, "cannot break outside of loop") |
