Files
mercury/library/error.nl
Fergus Henderson 04b720630b Update the copyright messages so that (a) they contain the correct years
and (b) they say "Copyright (C) ... _The_ University of Melbourne".
1997-07-27 15:09:59 +00:00

26 lines
733 B
Plaintext

%---------------------------------------------------------------------------%
% Copyright (C) 1994-1995, 1997 The University of Melbourne.
% This file may only be copied under the terms of the GNU Library General
% Public License - see the file COPYING.LIB in the Mercury distribution.
%---------------------------------------------------------------------------%
% This version is for debugging with np.
error(Message) :-
format("<Software Error: ~s>\n", [Message]),
ancestors(Anc),
( Anc \= [] ->
write('Stack trace:'), nl,
stack_trace(Anc),
interactive_display(1, Anc)
;
write('Stack trace unavailable.'), nl
),
fail.
stack_trace([]).
stack_trace([Anc|Ancs]) :-
print(Anc), write('.'), nl,
stack_trace(Ancs).