Boost logo

Boost :

From: Emil Dotchevski (emil_at_[hidden])
Date: 2007-10-23 15:39:16


> >> >> 1. As mentioned above, the ability to iterate through values and/or
> >> >> pass a visitor.
<snip>
> >> Use case for iterator over values: I may want an automated checker
> >> that verifies that exception A contains only somewhere specified values
> >> and nothing else.
> > If you don't insist on "and nothing else", what you want can be
> > implemented without adding iteration to Boost Exception.
>
> Let say we disagree here. I see iteration (or less conveniently visitation)
> as a useful mechanism for not-yet-designed tools that would automatically
> process, convert or check validity of exceptions.

Perhaps I don't understand exactly what you mean by iteration.

I see something like:

struct error_info_iterator_value_type
{
    std::type_info const * tag_type;
    std::type_info const * value_type;
    void const * value;
    std::string value_as_string;
};

I might be blind, but I can't see how could the iteration give me
anything more useful, and I can't think of any useful generic
processing that can be done with this (you can dump all this in a
string, but that's exactly what boost::exception::what() does.)

Emil Dotchevski


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