diff options
Diffstat (limited to 'src/lisp/error.rs')
-rw-r--r-- | src/lisp/error.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lisp/error.rs b/src/lisp/error.rs index f323bb8..9e9dc90 100644 --- a/src/lisp/error.rs +++ b/src/lisp/error.rs | |||
@@ -98,6 +98,7 @@ pub enum EvalError { | |||
98 | DivByZero, | 98 | DivByZero, |
99 | TypeMismatch, | 99 | TypeMismatch, |
100 | NoFileName, | 100 | NoFileName, |
101 | FileError(io::Error), | ||
101 | AccessEmptyList, | 102 | AccessEmptyList, |
102 | InvalidCoordinates((LispNumber, LispNumber)), | 103 | InvalidCoordinates((LispNumber, LispNumber)), |
103 | AssertionError { expected: LispExpr, got: LispExpr }, | 104 | AssertionError { expected: LispExpr, got: LispExpr }, |
@@ -126,6 +127,7 @@ impl fmt::Display for EvalError { | |||
126 | Self::TypeMismatch => write!(f, "mismatched types"), | 127 | Self::TypeMismatch => write!(f, "mismatched types"), |
127 | Self::DivByZero => write!(f, "attempt to divide by zero"), | 128 | Self::DivByZero => write!(f, "attempt to divide by zero"), |
128 | Self::NoFileName => write!(f, "no file name specified"), | 129 | Self::NoFileName => write!(f, "no file name specified"), |
130 | Self::FileError(e) => write!(f, "file error: {}", e), | ||
129 | Self::AccessEmptyList => write!(f, "attempted to access empty list"), | 131 | Self::AccessEmptyList => write!(f, "attempted to access empty list"), |
130 | Self::InvalidCoordinates((x, y)) => write!(f, "invalid coordinates: {} {}", x, y), | 132 | Self::InvalidCoordinates((x, y)) => write!(f, "invalid coordinates: {} {}", x, y), |
131 | Self::AssertionError { expected, got } => { | 133 | Self::AssertionError { expected, got } => { |