]> Repositorios git - scryer-prolog.git/commitdiff
Fix uninstantiation_error missing. Fix #1031
authorAdrián Arroyo Calle <[email protected]>
Tue, 16 Nov 2021 22:22:24 +0000 (23:22 +0100)
committerAdrián Arroyo Calle <[email protected]>
Tue, 16 Nov 2021 22:22:24 +0000 (23:22 +0100)
src/lib/atts.pl
src/lib/error.pl

index ed241f7e7e80ab94e8a6a42c043c8883308a1d20..5906466b530c9d99a259847163a95e2627ce1642 100644 (file)
@@ -101,13 +101,13 @@ expand_terms(Atts, Module) -->
 
 put_attrs_var_check -->
     [(put_atts(Var, Attr) :- nonvar(Var),
-                             throw(error(type_error(variable, Var), put_atts/2))),
+                             throw(error(uninstantiation_error(Var), put_atts/2))),
      (put_atts(Var, Attr) :- var(Attr),
                              throw(error(instantiation_error, put_atts/2)))].
 
 get_attrs_var_check(Module) -->
     [(get_atts(Var, Attr) :- nonvar(Var),
-                             throw(error(type_error(variable, Var), get_atts/2))),
+                             throw(error(uninstantiation_error(Var), get_atts/2))),
      (get_atts(Var, Attr) :- var(Attr),
                              !,
                              '$get_attr_list'(Var, Ls),
index 9959279076e08156e779668de89ab2253328c823..a79bd5608b68cd8925544995012e5f560d0beafa 100644 (file)
@@ -40,7 +40,7 @@ must_be_(Type, _) :-
         instantiation_error(must_be/2).
 must_be_(var, Term) :-
         (   var(Term) -> true
-        ;   throw(error(uninstantiation_error, must_be/2))
+        ;   throw(error(uninstantiation_error(Term), must_be/2))
         ).
 must_be_(integer, Term) :- check_(integer, integer, Term).
 must_be_(atom, Term)    :- check_(atom, atom, Term).