Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2003-01-14 09:57:03


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

One typical exception to message scenario would be

* catch the exception;
* obtain a format string using who() as a key;
* obtain a reason string using error() (or native_error(), depending on
portability) as a key;
* use the format string with path1, path2, reason as arguments to obtain a
message.


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