Michael Somos on Tue, 7 Jan 2003 15:14:54 -0500

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

gp: gcd(0) error message unhelpful


Perhaps I was not explicit enough, so I will explain further.
When I first encountered the error message "incorrect type in association."
I had no idea which of the functions that my program had called was
the source of the error. The word "association" has no connection to
to any name of a GP function. I am sure that others will encounter
the same problem when they see this error message. That was also
the problem with the tan() error message. The information that there
was a division by zero was distinctly unhelpful since I had not done
any explicit division by zero (I checked for that in my code). I had
to guess which gp function that I called had done the division by zero.
It seems to me a very important consideration that an error message
give a clear indication of which function triggered the error. Of
course, if there was a backtrace capability, that would be even more
helpful by giving the stack of function calls. In an ideal world, no
program will have any errors, but this is not an ideal world. All I
ask is some more or less explicit indication of where the error came
from. Adding a few more words to an error message seems like a very
minor thing to ask in order to save a lot of frustration in debugging
erroneous code. I suppose I could just use "gdb" and get a backtrace
that way if all else fails. Shalom, Michael