block users from catching user balls.
This commit is contained in:
parent
cf2b399e9a
commit
2f8c9c6b6c
15
pl/boot.yap
15
pl/boot.yap
@ -1147,13 +1147,24 @@ throw(Ball) :-
|
||||
|
||||
'$handle_throw'(_, _, _).
|
||||
'$handle_throw'(C, A, Ball) :-
|
||||
% reset info
|
||||
(Ball \== '$abort', C = Ball ->
|
||||
% reset info
|
||||
('catch_ball'(Ball, C) ->
|
||||
'$execute'(A)
|
||||
;
|
||||
throw(Ball)
|
||||
).
|
||||
|
||||
'catch_ball'('$abort', _, _) :- !, fail.
|
||||
% system defined throws should be ignored by used, unless the
|
||||
% user is hacking away.
|
||||
'catch_ball'(Ball, V) :-
|
||||
var(V),
|
||||
nonvar(Ball),
|
||||
functor(Ball, Name, _),
|
||||
atom_codes(Name, [0'$|_]), %'0
|
||||
!, fail.
|
||||
'catch_ball'(C, C).
|
||||
|
||||
'$run_toplevel_hooks' :-
|
||||
nb_getval('$break',0),
|
||||
recorded('$toplevel_hooks',H,_), !,
|
||||
|
Reference in New Issue
Block a user