Peter-Lawrence . Montgomery on Thu, 5 Apr 2001 20:48:43 +0200 (MET DST) |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: catching errors |
> From: Matias Atria <matias@sas.upenn.edu> > A short question: How can I catch errors in the PARI library from C code > so that my program does not die with > *** Error in the PARI system. End of program. ? > I see how this implemented by looking at the source code, but I could not > find a "public" (i.e. accessible from PARI's headers) mechanism to do it. > I don't mind using undocumented stuff, but I don't want to get in the way > of the library code. > > Please enlighten me. > > Many thanks, > Matias. After calling pari_init, I make two more calls if I am in debug mode on an IRIX system. These override the calls made by PARI, letting me use the debugger to trace some errors. signal(SIGBUS, SIG_DFL); signal(SIGSEGV, SIG_DFL); Peter Montgomery