Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2002-09-23 07:18:56

From: "Victor A. Wagner, Jr." <vawjr_at_[hidden]>
> At Monday 2002/09/23 04:47, you wrote:
> >From: "Victor A. Wagner, Jr." <vawjr_at_[hidden]>
> > > I understand, but it's a lot faster to do a "switch" on an int, than
on a
> > > const char* (another thing left out of the language)
> >
> >Why would you do a "switch" on an exception's error code?
> as was pointed out earlier in this thread, a single class of exception may
> have multiple reasons to be thrown, and the ability to discriminate may be
> important.

If the ability to discriminate is important to the caller, using a single
class is a design error.

Boost list run by bdawes at, gregod at, cpdaniel at, john at