protect readline against failure.
This commit is contained in:
parent
4ed9df43ac
commit
7463cbea96
@ -145,10 +145,10 @@ true :- true.
|
|||||||
|
|
||||||
/* main execution loop */
|
/* main execution loop */
|
||||||
'$read_vars'(user_input, Goal, Mod, Pos, Bindings) :-
|
'$read_vars'(user_input, Goal, Mod, Pos, Bindings) :-
|
||||||
'$swi_current_prolog_flag'(readline, true), !,
|
'$swi_current_prolog_flag'(readline, true),
|
||||||
read_history(h, '!h',
|
read_history(h, '!h',
|
||||||
[trace, end_of_file],
|
[trace, end_of_file],
|
||||||
' ?- ', Goal, Bindings),
|
' ?- ', Goal, Bindings), !,
|
||||||
(nonvar(Err) ->
|
(nonvar(Err) ->
|
||||||
print_message(error,Err), fail
|
print_message(error,Err), fail
|
||||||
;
|
;
|
||||||
|
Reference in New Issue
Block a user