Ara.T.Howard wrote: > > the problems is that > > errors[-2] != errors[-1] > > is always true. as the first bit of code shows, the '==' operator seems > to be > implemented in a counter intuitive way. doesn't it make sense that > exceptions > with the same class, message, and backtrace should be considered the same? > > looking briefly at error.c leads me to believe that it's Object#== used to > compare exceptions - does this make sense? > It depends on what you are asking when you want to know if two exceptions are the same. I can see where, on one hand, you would want them to be equal if they contain the same information, but on the other hand, sometimes you might want to know: are these two objects the same exception that was thrown at some instant x? In that case, it isn't sufficient to merely check the exception's contents, you have to make sure they have the same id and are literally the same object. Don't know if I've thrown any light on the subject or not, Ara. :) But I can see value in having exceptions compared both ways. -- Jamis Buck jgb3 / email.byu.edu http://www.jamisbuck.org/jamis "I use octal until I get to 8, and then I switch to decimal."