$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Peter Dimov (pdimov_at_[hidden])
Date: 2002-11-17 12:08:30
From: "Jeff Garland" <jeff_at_[hidden]>
> > FWIW, I much prefer well-defined what() strings
("boost::pointer_conflict")
> > that I can use as keys into a message table over implementation-defined
> > descriptive messages.
>
> I don't I agree with this. While I have no issue with your desire
> to have implementation defined descriptive messages...
Oops, ambiguous parse tree.
I much prefer
well-defined what() strings
over
implementation defined descriptive messages.
:-)
"Well defined" means:
char const * my_exception::what() const throw();
Returns: "my_exception"
"Implementation defined" means
char const * my_exception::what() const throw();
Returns: an implementation defined string that describes what happened.
> ... we can't expect
> all libraries (eg: non-boost) that throw std::exception to follow
> this policy.
You are right, we can't reasonably expect that. This IMO is a defect in the
standard. I'd definitely think twice before showing an implementation
defined string to the user; sometimes the result looks very unprofessional.
:-)
Whether the right solution is to fix what() or to introduce a separate
function is another matter, of course.