cl-interpret: Complain, rather than panic, on outlined module

This commit is contained in:
2024-07-11 02:48:35 -05:00
parent 58c5a01312
commit d692f6bb80
2 changed files with 6 additions and 5 deletions

View File

@@ -580,7 +580,7 @@ pub mod error {
want: usize,
got: usize,
},
NullPointer,
Outlined(Sym),
}
impl std::error::Error for Error {}
@@ -620,8 +620,8 @@ pub mod error {
if *want == 1 { "" } else { "s" }
)
}
Error::NullPointer => {
write!(f, "Attempted to dereference a null pointer?")
Error::Outlined(name) => {
write!(f, "Module {name} specified, but not imported.")
}
}
}