Document run_module_predicate and handle critical failure in toplevel.pl
This commit is contained in:
@@ -29,6 +29,19 @@ load_scryerrc :-
|
||||
).
|
||||
|
||||
'$repl' :-
|
||||
catch(
|
||||
start_repl,
|
||||
_,
|
||||
% Something bad enough happened that the REPL itself threw an error.
|
||||
% This can be caused by a broken user_output stream, so we cannot
|
||||
% print an error.
|
||||
%
|
||||
% The best we can do now is halt with an error code,
|
||||
% so that users can try to diagnose the issue:
|
||||
halt(99)
|
||||
).
|
||||
|
||||
start_repl :-
|
||||
asserta('$toplevel':started),
|
||||
raw_argv(Args0),
|
||||
( append(Args1, ["--"|_], Args0) ->
|
||||
|
||||
Reference in New Issue
Block a user