Boost logo

Boost :

From: William E. Kempf (wekempf_at_[hidden])
Date: 2003-01-15 02:01:41


Peter Dimov said:
> From: "William E. Kempf" <wekempf_at_[hidden]>
>>
>> Might be true for Boost.Filesystem. The path values may be useful in
>> some cases, for instance. I'm not 100% sure about the who() string,
>> though.
>
> The meaning of the path values is context dependent, and who() provides
> the context, although perhaps who() doesn't need to be a std::string, a
> const char * could do. (If the current what() semantics are dropped,
> what() can be made to carry the function name ("what failed"), and who()
> will become redundant.)

If what returns the function name that caused the exception, replacing
who, you've not eliminated dynamic allocations where they matter.

But I don't understand the utility of who(), i.e. what good is it to get a
single function name that originated the error? The user isn't going to
care about this information, and the developer is going to want a call
stack, not the originator (which may be buried several calls deep in the
interface the developer is actually dealing with!). I don't understand
the value add for this payload. I think the paths are similar to this,
though I can think of more scenarios where they might still be useful to
the developer, and once in a while possibly to the end user.

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