This is the mail archive of the gsl-discuss@sources.redhat.com mailing list for the GSL project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

problems with error handling


for some reason I don't get the error handling to work.

here's my actual code:

...
static int status;

status = gsl_integration_qagp( ... );
    
      if( GSL_SUCCESS != status )
          {
        if( GSL_EDIVERGE == status )
        {
          printf("error in gsl_qagp - cooper: integral divering. xi_0 = 
%.6f\tepsilon_0 = %.6f , lambda_limits = (%.6f,%.6f)\n",
             xi_0,epsilon_0,lambda_limits[0],lambda_limits[1]);
        }

        else
        {
          printf("error in gsl_qagp\n");
        }
          exit(42);
          }
...

but all that happens if the error occurs is

 >gsl: qagp.c:504: ERROR: integral is divergent, or slowly convergent
Abort

I guess I'm making a silly mistake once more. can anyone give me a hint?

thanks,

daniel


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]