make top-level error handling a bit more compatible with SWI.
This commit is contained in:
parent
fc2e01f320
commit
503d97af90
@ -697,9 +697,9 @@ install_data:
|
|||||||
$(INSTALL_DATA) $(srcdir)/LGPL/pillow/pillow.pl $(DESTDIR)$(SHAREDIR)/Yap/
|
$(INSTALL_DATA) $(srcdir)/LGPL/pillow/pillow.pl $(DESTDIR)$(SHAREDIR)/Yap/
|
||||||
# (cd CLPQR ; $(MAKE) install)
|
# (cd CLPQR ; $(MAKE) install)
|
||||||
@INSTALLCLP@(cd LGPL/clp ; $(MAKE) install)
|
@INSTALLCLP@(cd LGPL/clp ; $(MAKE) install)
|
||||||
@INSTALLCLP@(cd GPL/clpqr ; $(MAKE) install)
|
|
||||||
# (cd CHR ; $(MAKE) install)
|
# (cd CHR ; $(MAKE) install)
|
||||||
@INSTALLCLP@(cd packages/chr ; $(MAKE) install)
|
@INSTALLCLP@(cd packages/chr ; $(MAKE) install)
|
||||||
|
@INSTALLCLP@(cd packages/clpqr ; $(MAKE) install)
|
||||||
@INSTALLCLP@(cd packages/CLPBN ; $(MAKE) install)
|
@INSTALLCLP@(cd packages/CLPBN ; $(MAKE) install)
|
||||||
(cd packages/ProbLog ; $(MAKE) install)
|
(cd packages/ProbLog ; $(MAKE) install)
|
||||||
|
|
||||||
|
10
configure.in
10
configure.in
@ -1469,9 +1469,6 @@ mkdir -p library/tries
|
|||||||
mkdir -p library/rltree
|
mkdir -p library/rltree
|
||||||
mkdir -p library/lammpi
|
mkdir -p library/lammpi
|
||||||
mkdir -p library/yap2swi
|
mkdir -p library/yap2swi
|
||||||
mkdir -p CHR
|
|
||||||
mkdir -p CLPQR
|
|
||||||
mkdir -p packages/CLPBN
|
|
||||||
mkdir -p LGPL
|
mkdir -p LGPL
|
||||||
mkdir -p LGPL/JPL
|
mkdir -p LGPL/JPL
|
||||||
mkdir -p LGPL/JPL/java
|
mkdir -p LGPL/JPL/java
|
||||||
@ -1480,18 +1477,19 @@ mkdir -p LGPL/JPL/java/jpl/fli
|
|||||||
mkdir -p LGPL/JPL/java/jpl/test
|
mkdir -p LGPL/JPL/java/jpl/test
|
||||||
mkdir -p LGPL/JPL/src
|
mkdir -p LGPL/JPL/src
|
||||||
mkdir -p LGPL/clp
|
mkdir -p LGPL/clp
|
||||||
mkdir -p packages/chr
|
|
||||||
mkdir -p LGPL/swi_console
|
mkdir -p LGPL/swi_console
|
||||||
mkdir -p packages/PLStream
|
mkdir -p packages/PLStream
|
||||||
mkdir -p GPL
|
mkdir -p GPL
|
||||||
mkdir -p GPL/clpqr
|
|
||||||
mkdir -p GPL/http
|
mkdir -p GPL/http
|
||||||
|
mkdir -p packages/chr
|
||||||
|
mkdir -p packages/CLPBN
|
||||||
mkdir -p packages/cplint
|
mkdir -p packages/cplint
|
||||||
mkdir -p packages/ProbLog
|
mkdir -p packages/ProbLog
|
||||||
mkdir -p packages/ProbLog/simplecudd
|
mkdir -p packages/ProbLog/simplecudd
|
||||||
|
mkdir -p packages/clpqr
|
||||||
|
|
||||||
|
|
||||||
AC_OUTPUT(Makefile library/matrix/Makefile library/matlab/Makefile library/regex/Makefile library/system/Makefile library/random/Makefile library/yap2swi/Makefile library/mpi/Makefile .depend library/Makefile LGPL/Makefile packages/chr/Makefile packages/CLPBN/Makefile LGPL/clp/Makefile GPL/clpqr/Makefile library/lammpi/Makefile library/tries/Makefile library/rltree/Makefile LGPL/swi_console/Makefile LGPL/JPL/Makefile LGPL/JPL/src/Makefile LGPL/JPL/java/Makefile LGPL/JPL/jpl_paths.yap GPL/http/Makefile GPL/Makefile packages/cplint/Makefile packages/PLStream/Makefile packages/ProbLog/Makefile packages/ProbLog/simplecudd/Makefile)
|
AC_OUTPUT(Makefile library/matrix/Makefile library/matlab/Makefile library/regex/Makefile library/system/Makefile library/random/Makefile library/yap2swi/Makefile library/mpi/Makefile .depend library/Makefile LGPL/Makefile packages/chr/Makefile packages/CLPBN/Makefile LGPL/clp/Makefile packages/clpqr/Makefile library/lammpi/Makefile library/tries/Makefile library/rltree/Makefile LGPL/swi_console/Makefile LGPL/JPL/Makefile LGPL/JPL/src/Makefile LGPL/JPL/java/Makefile LGPL/JPL/jpl_paths.yap GPL/http/Makefile GPL/Makefile packages/cplint/Makefile packages/PLStream/Makefile packages/ProbLog/Makefile packages/ProbLog/simplecudd/Makefile)
|
||||||
|
|
||||||
make depend
|
make depend
|
||||||
(cd packages/PLStream; make depend; cd ../..)
|
(cd packages/PLStream; make depend; cd ../..)
|
||||||
|
@ -246,7 +246,7 @@ print_message(Severity, Term) :-
|
|||||||
'$oncenotrace'(prolog:message(Term, Lines, [])) ->
|
'$oncenotrace'(prolog:message(Term, Lines, [])) ->
|
||||||
true
|
true
|
||||||
;
|
;
|
||||||
'$message':generate_message(Term, Lines, [])
|
'$messages':generate_message(Term, Lines, [])
|
||||||
)
|
)
|
||||||
-> ( nonvar(Term),
|
-> ( nonvar(Term),
|
||||||
'$oncenotrace'(user:message_hook(Term, Severity, Lines))
|
'$oncenotrace'(user:message_hook(Term, Severity, Lines))
|
||||||
@ -280,19 +280,19 @@ print_message(_, Term) :-
|
|||||||
Term = error(syntax_error(_,_,_,_,_,_,_),_), !,
|
Term = error(syntax_error(_,_,_,_,_,_,_),_), !,
|
||||||
flush_output(user_output),
|
flush_output(user_output),
|
||||||
flush_output(user_error),
|
flush_output(user_error),
|
||||||
'$message':prefix(Level, LinePrefix, Stream, _, Lines), !,
|
'$messages':prefix(Level, LinePrefix, Stream, _, Lines), !,
|
||||||
% make sure we don't give a PC.
|
% make sure we don't give a PC.
|
||||||
print_message_lines(Stream, LinePrefix, Lines).
|
print_message_lines(Stream, LinePrefix, Lines).
|
||||||
'$print_system_message'(Term, Level, Lines) :-
|
'$print_system_message'(Term, Level, Lines) :-
|
||||||
'$message':prefix(Level, LinePrefix, Stream, Prefix),
|
'$messages':prefix(Level, LinePrefix, Stream, Prefix),
|
||||||
'$message':file_location(Prefix, LinesF, Lines), !,
|
'$messages':file_location(Prefix, LinesF, Lines), !,
|
||||||
flush_output(user_output),
|
flush_output(user_output),
|
||||||
flush_output(user_error),
|
flush_output(user_error),
|
||||||
print_message_lines(Stream, LinePrefix, LinesF).
|
print_message_lines(Stream, LinePrefix, LinesF).
|
||||||
'$print_system_message'(Error, Level, Lines) :-
|
'$print_system_message'(Error, Level, Lines) :-
|
||||||
flush_output(user_output),
|
flush_output(user_output),
|
||||||
flush_output(user_error),
|
flush_output(user_error),
|
||||||
'$message':prefix(Level, LinePrefix, Stream, LinesF, Lines), !,
|
'$messages':prefix(Level, LinePrefix, Stream, LinesF, Lines), !,
|
||||||
print_message_lines(Stream, LinePrefix, LinesF).
|
print_message_lines(Stream, LinePrefix, LinesF).
|
||||||
|
|
||||||
|
|
||||||
|
@ -127,7 +127,7 @@ system_mode(verbose,off) :- set_value('$verbose',off).
|
|||||||
:- use_module('messages.yap').
|
:- use_module('messages.yap').
|
||||||
:- use_module('hacks.yap').
|
:- use_module('hacks.yap').
|
||||||
|
|
||||||
'$system_module'('$message').
|
'$system_module'('$messages').
|
||||||
'$system_module'('$hacks').
|
'$system_module'('$hacks').
|
||||||
|
|
||||||
yap_hacks:cut_by(CP) :- '$$cut_by'(CP).
|
yap_hacks:cut_by(CP) :- '$$cut_by'(CP).
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
* *
|
* *
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
|
|
||||||
:- module('$message',
|
:- module('$messages',
|
||||||
[system_message/4,
|
[system_message/4,
|
||||||
prefix/6,
|
prefix/6,
|
||||||
prefix/5,
|
prefix/5,
|
||||||
@ -79,7 +79,11 @@ stack_dump(error(_,_)) -->
|
|||||||
'$hacks':display_stack_info(CPs, Envs, 20, CP).
|
'$hacks':display_stack_info(CPs, Envs, 20, CP).
|
||||||
stack_dump(_) --> [].
|
stack_dump(_) --> [].
|
||||||
|
|
||||||
|
prolog_message(X,Y,Z) :-
|
||||||
|
system_message(X,Y,Z).
|
||||||
|
|
||||||
%message(loaded(Past,AbsoluteFileName,user,Msec,Bytes), Prefix, Suffix) :- !,
|
%message(loaded(Past,AbsoluteFileName,user,Msec,Bytes), Prefix, Suffix) :- !,
|
||||||
|
system_message(query(_QueryResult,_)) --> [].
|
||||||
system_message(format(Msg, Args)) -->
|
system_message(format(Msg, Args)) -->
|
||||||
[Msg - Args].
|
[Msg - Args].
|
||||||
system_message(ancestors([])) -->
|
system_message(ancestors([])) -->
|
||||||
@ -485,3 +489,4 @@ prefix(banner, '', user_error) --> [].
|
|||||||
prefix(informational, '~*|% '-[LC], user_error) -->
|
prefix(informational, '~*|% '-[LC], user_error) -->
|
||||||
{ '$show_consult_level'(LC) }.
|
{ '$show_consult_level'(LC) }.
|
||||||
|
|
||||||
|
|
||||||
|
@ -38,6 +38,7 @@
|
|||||||
'$hide'('$dbref') :- !, fail. /* not stream position */
|
'$hide'('$dbref') :- !, fail. /* not stream position */
|
||||||
'$hide'('$stream') :- !, fail. /* not $STREAM */
|
'$hide'('$stream') :- !, fail. /* not $STREAM */
|
||||||
'$hide'('$stream_position') :- !, fail. /* not stream position */
|
'$hide'('$stream_position') :- !, fail. /* not stream position */
|
||||||
'$hide'('$hacks') :- !, fail. /* not stream position */
|
'$hide'('$hacks') :- !, fail.
|
||||||
|
'$hide'('$messages') :- !, fail.
|
||||||
'$hide'(Name) :- hide(Name), fail.
|
'$hide'(Name) :- hide(Name), fail.
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user