Skip to content

Commit

Permalink
disable long crazy tracing for now.. wioll add switches to tunr it on…
Browse files Browse the repository at this point in the history
… later
  • Loading branch information
TeamSPoon committed Dec 14, 2024
1 parent f353c29 commit 7e55c88
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions prolog/metta_lang/metta_interp.pl
Original file line number Diff line number Diff line change
Expand Up @@ -1313,6 +1313,7 @@
ignore(( \+ ((forall(load_hook0(Load,Hooked),true))))),!.


rtrace_on_error(G):- !, call(G).
%rtrace_on_error(G):- catch(G,_,fail).
rtrace_on_error(G):-
catch_err(G,E,
Expand Down
6 changes: 3 additions & 3 deletions prolog/metta_lang/metta_utils.pl
Original file line number Diff line number Diff line change
Expand Up @@ -860,7 +860,7 @@
% to `t` or when the system is running in CGI mode.
%
% The `notrace/0` predicate is used to disable tracing.
%never_rrtrace:-!.
never_rrtrace:-!.
never_rrtrace :-
% If `cant_rrtrace` is currently set to `t`, disable tracing using `notrace`.
nb_current(cant_rrtrace, t),!,notrace.
Expand Down Expand Up @@ -1453,7 +1453,7 @@
super_safety_checks(G):- (call(G)*->true;on_mettalog_error(super_safety_checks(failed(G)))).

% If there is an error, log it, perform a stack dump
ugtrace(Why, _):- notrace((write_src_uo(ugtrace(Why,G)),stack_dump, write_src_uo(ugtrace(Why,G)), fail)).
%ugtrace(Why, _):- notrace((write_src_uo(ugtrace(Why,G)),stack_dump, write_src_uo(ugtrace(Why,G)), fail)).

ugtrace(Why, _):- on_mettalog_error(Why), fail.
% If tracing is already enabled, log the reason and trace the goal G.
Expand Down Expand Up @@ -1510,7 +1510,7 @@
% ?- rrtrace(my_wrapper, my_goal).
%
% If reversible tracing is disabled, log the message and fail.
rrtrace(P1, X):- never_rrtrace, !, nop((u_dmsg(cant_rrtrace(P1, X)))), !, fail.
rrtrace(P1, X):- never_rrtrace, !, ((u_dmsg(cant_rrtrace(P1, X)))), !, fail.
% If in a CGI environment, log the HTML output and call the goal normally.
rrtrace(P1, G):- is_cgi, !, u_dmsg(arc_html(rrtrace(P1, G))), call(P1, G).
% If not in a GUI tracer environment, disable tracing and call the goal, or enable interactive tracing (itrace).
Expand Down

0 comments on commit 7e55c88

Please sign in to comment.