throw exceptions when modules do not contain claimed exports

This commit is contained in:
Mark Thom
2021-02-09 12:17:34 -07:00
parent cc7e21170f
commit 195273f01d
4 changed files with 47 additions and 29 deletions

View File

@@ -377,15 +377,15 @@ impl fmt::Display for SessionError {
// &SessionError::InvalidFileName(ref filename) => {
// write!(f, "filename {} is invalid", filename)
// }
// &SessionError::ModuleDoesNotContainExport(ref module, ref key) => {
// write!(
// f,
// "module {} does not contain claimed export {}/{}",
// module,
// key.0,
// key.1,
// )
// }
&SessionError::ModuleDoesNotContainExport(ref module, ref key) => {
write!(
f,
"module {} does not contain claimed export {}/{}",
module,
key.0,
key.1,
)
}
&SessionError::OpIsInfixAndPostFix(_) => {
write!(f, "cannot define an op to be both postfix and infix.")
}