/// match an existing variant.
MachineError(String),
+ /// Not actually an interprer error -- used to signal that execution has exited
+ /// with the given status code.
+ Exit(i32),
+
FunctionAbiMismatch(Abi, Abi),
FunctionArgMismatch(Ty<'tcx>, Ty<'tcx>),
FunctionRetMismatch(Ty<'tcx>, Ty<'tcx>),
use self::InterpError::*;
match *self {
MachineError(ref inner) => inner,
+ Exit(..) =>
+ "exited",
FunctionAbiMismatch(..) | FunctionArgMismatch(..) | FunctionRetMismatch(..)
| FunctionArgCountMismatch =>
"tried to call a function through a function pointer of incompatible type",
write!(f, "the evaluated program panicked at '{}', {}:{}:{}", msg, file, line, col),
InvalidDiscriminant(val) =>
write!(f, "encountered invalid enum discriminant {}", val),
+ Exit(code) =>
+ write!(f, "exited with status code {}", code),
_ => write!(f, "{}", self.description()),
}
}