Ok, I see. So I have to disable the default error handler to be able to catch the return codes. Sorry, I actually read the section of the manual you are refering to, but I must have missed that fact.
Thanks for helping out. Johannes 2011/7/29 Alejandro Cámara Iglesias <[email protected]> > I think that's the right behaviour. > > If you want to disable the error handler (in order to manage yourself the > errors) you can use [1]: > > gsl_error_handler_t * *gsl_set_error_handler_off* () > > Alternatively, you can use your own error handler by using: > > gsl_error_handler_t * *gsl_set_error_handler* (gsl_error_handler_t * > new_handler) > > Please refer to [1]: > http://www.gnu.org/s/gsl/manual/html_node/Error-Handlers.html > > I hope it helps! > > *Alejandro Cámara* > PhD Student of the GICO <http://www.ucm.es/info/giboucm/> > > > > 2011/7/29 Johannes Marbach <[email protected]> > >> Hi. >> >> When I'm calling gsl_sf_bessel_Knu_e with rather large arguments the >> program >> immediately invokes the default error handler without allowing me to check >> the return code. As far as I understood this isn't the intended behaviour, >> or is it? >> >> Here's my sample program's source code >> >> #include <stdio.h> >> #include <gsl/gsl_sf_bessel.h> >> >> int main () { >> gsl_sf_result res; >> int rc = gsl_sf_bessel_Knu_e (2.5, 2000, &res); >> printf ("%i\n", rc); >> printf ("%e\n", res.val); >> printf ("%e\n", res.err); >> >> return 0; >> } >> >> After compiling and running the program I receive >> >> [jm@elroy gsl]$ gcc -lgsl -lgsl -lgslcblas -lm bessel.c >> [jm@elroy gsl]$ ./a.out >> gsl: exp.c:257: ERROR: underflow >> Default GSL error handler invoked. >> Aborted >> >> I'm using GSL 1.15 on Arch Linux. >> >> Regards >> Johannes >> _______________________________________________ >> Bug-gsl mailing list >> [email protected] >> https://lists.gnu.org/mailman/listinfo/bug-gsl >> > > _______________________________________________ Bug-gsl mailing list [email protected] https://lists.gnu.org/mailman/listinfo/bug-gsl
