This is the mail archive of the
gsl-discuss@sources.redhat.com
mailing list for the GSL project.
Re: Error Handling
- From: Brian Gough <bjg at network-theory dot co dot uk>
- To: Andrew Binkley <abinkley at cs dot toronto dot edu>
- Cc: gsl-discuss at sources dot redhat dot com
- Date: Thu, 19 Jun 2003 17:59:41 +0100
- Subject: Re: Error Handling
- References: <Pine.LNX.4.44.0306191134520.8826-100000@epoch.cs>
Andrew Binkley writes:
> I have read the gsl documentation and was thinking of using the
> macro GSL_ERROR (reason, gsl_errno). However as far as I can tell
> this has a return type of int, and my functions have a return type
> of gsl_complex. Should I just return the gsl_errno in both the
> real and imaginary components?
>
> I have looked through the existing gsl/complex/math.c but can't
> find any clues. What is a good way to go about this? The errors I
> would like to signify are GSL_ERANGE (for both over and underflow)
> and domain error.
Hi,
Try the macro GSL_ERROR_VAL() in gsl_errno.h which calls the error
handler but returns an arbitrary value.
regards,
--
Brian
Network Theory Ltd
15 Royal Park
Bristol BS8 3AL
United Kingdom
Tel: +44 (0)117 3179309
Fax: +44 (0)117 9048108
Web: http://www.network-theory.co.uk/