diff --git a/prolog/metta_lang/metta_interp.pl b/prolog/metta_lang/metta_interp.pl index 737c98bb47..5d29935e38 100755 --- a/prolog/metta_lang/metta_interp.pl +++ b/prolog/metta_lang/metta_interp.pl @@ -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, diff --git a/prolog/metta_lang/metta_utils.pl b/prolog/metta_lang/metta_utils.pl index 622cb7a76e..a3712f5db6 100755 --- a/prolog/metta_lang/metta_utils.pl +++ b/prolog/metta_lang/metta_utils.pl @@ -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. @@ -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. @@ -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).