This is the mail archive of the gsl-discuss@sources.redhat.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]
Other format: [Raw text]

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] 


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