This is the mail archive of the
gsl-discuss@sources.redhat.com
mailing list for the GSL project.
Suggestion of improving error reporting.
- From: Alan Aspuru-Guzik <alan at aspuru dot com>
- To: "gsl-discuss at sources dot redhat dot com" <gsl-discuss at sources dot redhat dot com>
- Date: Thu, 22 Jul 2004 15:35:30 -0700
- Subject: Suggestion of improving error reporting.
Dear all,
As always I thank Brian and all the authors for the library I use for my
own work all the time.
There is a small suggestions that could improve the life of us, the
developers a lot:
When a matrix is wrongly accessed, one gets the following errors:
#if GSL_RANGE_CHECK
if (i >= m->size1)
{
GSL_ERROR_VAL("first index out of range", GSL_EINVAL, 0) ;
}
else if (j >= m->size2)
{
GSL_ERROR_VAL("second index out of range", GSL_EINVAL, 0) ;
}
#endif
Would it be possible to report the indexes and also the two sizes of the
matrix (or the index and the size of the vector) so when somebody
debugs, one doesn't need to go to the debugger or printf to find it?
If peple think it is useful, I could write a patch for this.
Alan
--
- - - - - - - - - - - - - [ cut here ] - - - - - - - - - - - - - - - - -
Alán Aspuru-Guzik [http://alan.aspuru.com]