]> Repositorios git - scryer-prolog.git/commitdiff
add module name and missing predicate key to module_does_not_contain_claimed_export...
authorMark <[email protected]>
Mon, 4 Dec 2023 18:19:36 +0000 (11:19 -0700)
committerMark <[email protected]>
Mon, 4 Dec 2023 18:19:44 +0000 (11:19 -0700)
src/machine/machine_errors.rs

index f509b46c9a6c2c44c54ab738fa27825aee23533f..02133f323b3667c5d62f88fe6a142b3fb7048d84 100644 (file)
@@ -492,13 +492,22 @@ impl MachineState {
                 self.permission_error(Permission::Modify, atom!("static_module"), module)
             }
             SessionError::ExistenceError(err) => self.existence_error(err),
-            SessionError::ModuleDoesNotContainExport(..) => {
-                let error_atom = atom!("module_does_not_contain_claimed_export");
+            SessionError::ModuleDoesNotContainExport(module_name, key) => {
+                let functor_stub = functor_stub(key.0, key.1);
+
+                let stub = functor!(
+                    atom!("module_does_not_contain_claimed_export"),
+                    [
+                        atom(module_name),
+                        str(self.heap.len() + 4, 0)
+                    ],
+                    [functor_stub]
+                );
 
                 self.permission_error(
                     Permission::Access,
                     atom!("private_procedure"),
-                    functor!(error_atom),
+                    stub,
                 )
             }
             SessionError::ModuleCannotImportSelf(module_name) => {