]> Repositorios git - scryer-prolog.git/commitdiff
use existence_error for dropped streams (#1472)
authorMark Thom <[email protected]>
Mon, 23 May 2022 17:15:58 +0000 (11:15 -0600)
committerMark Thom <[email protected]>
Mon, 23 May 2022 17:15:58 +0000 (11:15 -0600)
src/machine/streams.rs

index 298c34414c5993c4b770bb86f51b3f32a3713ce8..7383908770c74d11557ccbe32760de8fd48a28b3 100644 (file)
@@ -1343,6 +1343,12 @@ impl MachineState {
                              Ok(stream)
                          };
                      }
+                     (ArenaHeaderTag::Dropped, _value) => {
+                         let stub = functor_stub(caller, arity);
+                         let err = self.existence_error(ExistenceError::Stream(addr));
+
+                         return Err(self.error_form(err, stub));
+                     }
                      _ => {
                      }
                 );