Jeroen Demeyer on Fri, 02 Nov 2007 19:11:13 +0100


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: Patch: user warnings in GP


Bill Allombert wrote:
On Thu, Nov 01, 2007 at 03:18:29PM +0100, Jeroen Demeyer wrote:
Index: src/functions/programming/error
===================================================================
RCS file: /home/cvs/pari/src/functions/programming/error,v
retrieving revision 1.7
diff -u -r1.7 error
--- src/functions/programming/error	31 Mar 2007 13:49:48 -0000	1.7
+++ src/functions/programming/error	1 Nov 2007 14:17:44 -0000
@@ -14,7 +14,7 @@
 Prototype: vs*
 Help: error({str}*): abort script with error message str
Description: - (?gen,...):void pari_err(talker, "${2 format_string}"${2 format_args})
+ (?gen,...):void  pari_err(user, "${2 format_string}"${2 format_args})
 Doc: outputs its argument list (each of
  them interpreted as a string), then interrupts the running \kbd{gp} program,
  returning to the input prompt. For instance

I am not sure whether you intended to send this hunk, but I have
considered doing that already and I am of two mind about it:

Using 'user' is more 'correct' than 'talker' but pari_err(talker,...)
make the generated code looks more like libpari code.

Very personnaly, I find the way user error are displayed under GP terribly
ugly.
I did intend to send that hunk, but only because I thought it was a mistake. If you want user errors to look like PARI errors, you could just change pari_err() to print "***" instead of "### User error:".
I would personally be in favor of this.

Anyway, that was not the main point of the patch.