Move g_caused_exception/2 dynamic directive to toplevel.pl
- Add dynamic directive in toplevel.pl with other module-level directives - Update test files to reference it as '':g_caused_exception/2 - Remove redundant dynamic directives from test files - All tests passing
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
:- dynamic(disabled_init_file/0).
|
||||
:- dynamic(started/0).
|
||||
:- dynamic(custom_toplevel/1).
|
||||
:- dynamic(g_caused_exception/2).
|
||||
|
||||
load_scryerrc :-
|
||||
( '$home_directory'(HomeDir) ->
|
||||
@@ -180,7 +181,7 @@ run_goals([g(Gs0)|Goals]) :- !,
|
||||
( write_term(Goal, [variable_names(VNs),double_quotes(DQ)]),
|
||||
write(' causes: '),
|
||||
write_term(Exception, [double_quotes(DQ)]), nl,
|
||||
asserta(user:g_caused_exception(Goal, Exception))
|
||||
asserta(g_caused_exception(Goal, Exception))
|
||||
)
|
||||
) -> true
|
||||
; write('% Warning: initialization failed for: '),
|
||||
|
||||
Reference in New Issue
Block a user