print errors with line numbers in GNU style

This commit is contained in:
Mark Thom
2019-10-04 15:32:26 -06:00
parent caeff99f69
commit d4f9d18149
7 changed files with 131 additions and 83 deletions

View File

@@ -31,9 +31,13 @@
!.
'$print_exception'(E) :-
write_term('caught: ', [quoted(false)]),
writeq(E),
nl.
( E = error(_, _:_) -> true % if the error source contains a line
% number, a GNU-style error message
% is expected to be printed instead.
; write_term('caught: ', [quoted(false)]),
writeq(E),
nl
).
'$predicate_indicator'(Source, PI) :-
( nonvar(PI) ->