Iwao KIMURA on Wed, 11 Sep 2002 04:28:19 +0900 (JST) |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
error recovery (was Re: gp: series bug) |
Hi Pari developers, From: Ilya Zakharevich <ilya@Math.Berkeley.EDU> Subject: Re: gp: series bug Date: Sun, 8 Sep 2002 14:41:07 -0700 > This is a long-standing defect in the error-recovery system. > > 0) It is not documented how to do error-recovery; BTW, does anybody tell me how to do error-recovery ? The way I took (and am taking) is (0) define the function void pariErrdie(void) { longjmp (buf, 1); /* jmp_buf buf is declared somewhere globally */ return; } (1) In the eary stage (after calling pari_init()), we put pariErr->die = pariErrdie; (2) Every time I want to call Pari library function, ltop = avma; if (!setjmp (buf)) { /* call Pari library function */ parifunc (some, args, here); } else { /* clear up */ avma = ltop; } Regards ;# Iwao KIMURA ;# ;# Faculty. Math, Dept. of Sciece ;# ;# Toyama University, Toyama Japan ;#