diff options
| author | Edvard Thörnros <edvard.thornros@gmail.com> | 2021-02-17 22:42:38 +0100 |
|---|---|---|
| committer | Edvard Thörnros <edvard.thornros@gmail.com> | 2021-02-19 18:02:45 +0100 |
| commit | ab05add4c3fbe25c688e16af9d8a9849669b797e (patch) | |
| tree | 3796f7834dea166d394f4a9d349ce5d4dec589eb /src/vm.rs | |
| parent | a00e2b3f034cc8739eaa983977f5b63948feec07 (diff) | |
| download | sylt-ab05add4c3fbe25c688e16af9d8a9849669b797e.tar.gz | |
make op errors into TypeError
Diffstat (limited to 'src/vm.rs')
| -rw-r--r-- | src/vm.rs | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -26,7 +26,7 @@ macro_rules! one_op { let b = $fun(&a); if b.is_nil() { $self.push(b); - error!($self, ErrorKind::ValueError($op, vec![a])); + error!($self, ErrorKind::TypeError($op, vec![a.into()])); } $self.push(b); }; @@ -38,7 +38,7 @@ macro_rules! two_op { let c = $fun(&a, &b); if c.is_nil() { $self.push(c); - error!($self, ErrorKind::ValueError($op, vec![a, b])); + error!($self, ErrorKind::TypeError($op, vec![a.into(), b.into()])); } $self.push(c); }; |
