protect readline against failure.

This commit is contained in:
Vítor Santos Costa 2011-04-04 14:35:42 +01:00
parent 4ed9df43ac
commit 7463cbea96

View File

@ -145,10 +145,10 @@ true :- true.
/* main execution loop */
'$read_vars'(user_input, Goal, Mod, Pos, Bindings) :-
'$swi_current_prolog_flag'(readline, true), !,
'$swi_current_prolog_flag'(readline, true),
read_history(h, '!h',
[trace, end_of_file],
' ?- ', Goal, Bindings),
' ?- ', Goal, Bindings), !,
(nonvar(Err) ->
print_message(error,Err), fail
;