From: Terrance S. <ts...@us...> - 2001-10-24 20:19:27
|
Update of /cvsroot/xsb/XSB/syslib In directory usw-pr-cvs1:/tmp/cvs-serv13040 Modified Files: standard.O standard.P Log Message: Made the error reporting in name/2 report the value of non-variable arguments when it aborts. Index: standard.O =================================================================== RCS file: /cvsroot/xsb/XSB/syslib/standard.O,v retrieving revision 1.48 retrieving revision 1.49 diff -u -r1.48 -r1.49 Binary files /tmp/cvsMF7bny and /tmp/cvseahlpW differ Index: standard.P =================================================================== RCS file: /cvsroot/xsb/XSB/syslib/standard.P,v retrieving revision 1.48 retrieving revision 1.49 diff -u -r1.48 -r1.49 --- standard.P 2001/07/04 13:54:25 1.48 +++ standard.P 2001/10/24 20:19:20 1.49 @@ -259,6 +259,7 @@ get0(C) :- stat_flag(CURRENT_INPUT, File), file_get(File, C0), C = C0. +% Not in manual. skip(C) :- get0(C0), (C0=C ; skip(C)). % TLS: most error checking assumed to happen in atom_codes or put. @@ -518,16 +519,16 @@ name(T, L) :- term_type(T, Type), ( Type =:= XSB_FREE -> - ( var(L) -> abort('Uninstantiated argument 2 of name/2') + ( var(L) -> abort('Uninstantiated arguments 1 & 2 of name/2') ; ( ascii_list(L) -> ( int_fromlist(L, T) -> true ; atom_codes(T, L) ) - ; abort('Wrong type in argument 2 of name/2') + ; abort(['Wrong type in argument 2 of name/2:',L]) ) ) ; Type =:= XSB_INT -> int_name(T, [], L) % integer ; Type =:= XSB_FLOAT -> real_name(T, [], L) % real ; Type =:= XSB_STRING -> atom_codes(T, L) - ; abort('Wrong type in argument 1 of name/2') + ; abort(['Wrong type in argument 1 of name/2:',T]) ). ascii_list([]). |