Bill Allombert on Sun, 01 Sep 2013 10:17:55 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: pari_err(): callback function instead of longjmp() |
On Fri, Aug 30, 2013 at 01:55:31PM +0200, Jeroen Demeyer wrote: > Hello pari-dev, > > We at Sage are currently revisiting the way we do PARI error > handling. I remind you we are using PARI-2.5.4 (but I don't think > that makes such an important difference for this discussion). > > It would be much more useful for Sage to have a callback function > called from pari_err() instead of a longjmp(). I am talking about > the following code: This is already the case, see the documentation of cb_pari_handle_exception(). > pari_err(int numerr, ...) > { > ... > if (s_ERR_CATCH.n) > { > ... > longjmp(*(trapped->penv), numerr); > ... > } > > What's your opinion on adding the possibility of a callback function > instead? If you don't like it, we're probably going to do it anyway > in the Sage "fork" of PARI :-) I think you are misunderstanding the purpose of this code. Cheers, Bill