Better exception handling, namespace collision fixed
Status: Beta
Brought to you by:
aerpenbeck
This patch changes the exception handling in ruby-gsl a bit.
Previously, GSL exceptions were subclasses of Exception, not
StandardError, which means that by default they were not caught.
This patch makes GSLException inherit from StandardError, and
adds several subclasses of GSLException to correspond to the error
codes in gsl_errno.h. The ruby error handler for GSL now throws
an exception which differs depending on the error code received.
Also, I changed the variable named rbgsl_cMFunction in *both*
MultiFunction.c and Monte.c to rbgsl_cMultiFunction and
rbgsl_cMonteFunction respectively.
Except for the namespace collision, this isn't fixing an error, but I
hope you think it makes the module better.
Unified diff between my changes and the CVS repository on 7-Apr-2004