This is the mail archive of the gsl-discuss@sourceware.cygnus.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]

Re: scripting interfaces for gsl


Generating an exception in the VHLL is the right way to go, either with
the error code as an argument or having separate exceptions for each
error code.  You may want to include the descriptive reason string which
gives extra information. This is what we will do for C++, by defining
the GSL_ERROR(code,reason) macro as something like throw
GSL_Exception(code,reason).

Klaus Schilling wrote:
> As far as error handling goes, my preferred way is to throw an exception
> with the error number as argument for the exception handler, so that the
> VHLL coder can decide how to deal with errors, and still avoid segfaults.
> Is that a good way for wrapping gsl routines that return 0 on success, -1
> on error?


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