Boost logo

Boost :

From: William E. Kempf (wekempf_at_[hidden])
Date: 2003-01-17 01:20:44


Peter Dimov said:
> From: "William E. Kempf" <wekempf_at_[hidden]>
>>
>> Peter Dimov said:
>
> [...]
>
>> > How would you use a call stack to generate an user friendly error
>> message?
>>
>> I wouldn't. User friendly error messages would only be generated
>> close to the throw point, where *I* have enough contextual information
>> to generate an error message with out a who().
>
> This translates to
>
> "I think that who() is useless because it isn't useful to me. I practice
> a particular programming style that lets me obtain the information that
> who() would supply. Therefore, I will deny others this functionality as
> a matter of principle, even though it is trivial for me to tag every
> throw statement. It is plain obvious that styles of programming other
> than my own don't deserve any support."

That's a very harsh interpretation, and certainly not what was meant by
what I said.

>> The call stack info would be used to
>> generate a *developer* friendly message (sent to a log, not presented
>> to the end user).
>
> This is a common theme in this exchange. In this context, I am not
> concerned with developer friendly error messages, that indicate logic
> errors (bugs) in client code. I can make sure - in theory - that such an
> exception is never thrown by not having bugs. It is exceptions that
> occur in the course in the normal operation that I'm talking about.

And those, in order to be dealt with in a useful manner, have to be
handled at a point close to the throw point, in order to be able to deal
with the exception in a meaningful manner. This means much more than just
supplying an error message, but does indicate that I should have enough
context to supply such a message.

William E. Kempf
wekempf_at_[hidden]


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk