diff --git a/library/builtins.pl b/library/builtins.pl index 59eb7ca0e..3897dbfff 100644 --- a/library/builtins.pl +++ b/library/builtins.pl @@ -3,6 +3,11 @@ resource_error(Resource, Context) :- throw(error(resource_error(Resource), Context)). +error(Err, Impl) :- + must_be(Err, atom, error/2, _), + F =.. [Err, Impl], + throw(F). + predicate_property(P, A) :- nonvar(P), atom(A), !, must_be(P, callable, predicate_property/2, _),