Bill Allombert on Wed, 12 Mar 2003 16:49:00 +0100


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

Re: trap()ing user errors


On Wed, Mar 12, 2003 at 04:35:28PM +0100, Bill Allombert wrote:
> Hello PARI-Dev,
> What is lacking to trap, in my opinion:
> 1) REC is not provided with error code/error message
> 2) We cannot trap 'everything but that error'.
> 3) No GP2C support.
and 4) proper rewinding of local variables after an error.
As such trap(,REC,) is dangerous to use:

parisize = 4000000, primelimit = 500000
? f(x)=local(V);V=x; error("Boum");
? V=2;
? trap(,1,f(3));
? print(V)
3

Cheers,
Bill.