Skip to content

Commit

Permalink
Modified history file error handling to prevent abrupt halts; replace…
Browse files Browse the repository at this point in the history
…d halt/1 with a controlled failure to improve debugging experience.
  • Loading branch information
TeamSPoon committed Feb 1, 2025
1 parent f75a733 commit 8cf0145
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions prolog/metta_lang/metta_repl.pl
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@
check_file_exists_for_append(HistoryFile) :-
% If the file cannot be created, print an error message and halt the program.
write("Error opening history file: "),
writeln(HistoryFile),
halt(1).
writeln(HistoryFile),!.
%halt(1).

%! save_history is det.
% Saves the current input history to a file if input is from a terminal (tty).
Expand Down

0 comments on commit 8cf0145

Please sign in to comment.