Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2002-10-14 10:42:20


From: "Joel de Guzman" <djowel_at_[hidden]>
> From: "Carl Daniel" <cpdaniel_at_[hidden]>
>
> > More nits:
> >
> > Exception classes thrown by Spirit (parser_error<>,
illegal_backtracking)
> > don't derive from std::exception - shouldn't they?
>
> I'm not sure. Should it? What will be the benefits in doing so?
> The truth is, I'm not quite happy with the standard C++ exceptions.
> For one, it's hard coded the what() to be a string.

Yes, they should, allowing a single catch handler to catch them. Yes, this
applies even in cases where the exceptions are "not supposed to" break
outside a limited context.

FWIW, I _always_ return the exception class name from what()
("boost::spirit::illegal_backtracking" for example.) This allows me to use
it as a key in a localized error message table.


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