Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2003-01-16 10:46:15


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."

> 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.

If you can include a call stack in the lock_error that is thrown for double
locks or double unlocks, do so. This exception has a different audience. The
user of the application should never encounter one.


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