Sean Kelly wrote:
The .next property is to allow chaining. However, it may be that the current behavior of toString is incorrect, or that a new function should be added that only returns a string describing the current exception and not the entire chain.
IMO, it should be the opposite. I noticed the current behavior the other day and was surprised. I would expect toString to return only the message from the Throwable I called it on. A concatenated string of messages from the whole chain would be the special case to be separated into a convenience function. Then again, I don't see the convenience function being necessary, as it's trivial to roll your own for the cases when you want it -- which is what I was doing when I discovered the current behavior and, like Andrej, was confronted by a long list of exception messages.
