Bill Allombert on Sat, 24 Jun 2006 11:27:31 +0200


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

Re: PARI_stack_limit


On Sat, Jun 24, 2006 at 08:28:38AM +0200, Bernard Parisse wrote:
> BTW, is there some documentation on how the error system of
> pari works? Using defaults settings, an error (e.g. a bad
> argument type for a pari call) does an exit of the application that
> can not be catched using C++ try/catch. I have to fork
> the xcas process to make a safe pari call and use pipes
> which is not a very efficient solution. 

Yes, see chapter 5, pari_init_opts
1) use pari_init_opts() and do not set INIT_JMPm
(see chapter 5) to deactivate pari dafault error handling.

2) use if(setjmp(GP_DATA->env)){...} where you want PARI to longjump to in
case of an error.

Cheers,
Bill.