Jeroen Demeyer on Fri, 30 Aug 2013 13:55:38 +0200


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

pari_err(): callback function instead of longjmp()


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:

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 :-)

Cheers,
Jeroen.