Boost logo

Boost :

From: Daryle Walker (darylew_at_[hidden])
Date: 2007-07-17 16:20:41

Emil Dotchevski wrote:
> I guess pointing at the documentation of the proposed Boost Exception counts
> as generating buzz :)
> The source code with boost-build jamfiles and tests can be downloaded here:
> The source code is also available for online browsing:

Based on a quick read of the documentation:

1. What happens if a "boost::error_info" tag is used multiple times on
the same object? Is it an error (exception or assert?), do the
instances get combined like a multi-set, or do all instances besides the
first (or last) get ignored/dropped? Shouldn't this be documented?

2. Shouldn't all inheritance of "boost::exception," especially via
"enable_error_info," be of the virtual kind? Catching a given class
type only works if it has exactly one connection to the actual exception
object, which means that:

        a. The type is the final type of the object
        b. The type appears exactly once in the inheritance hierarchy
        c. All inheritance appearances of the type are virtual

If a class type uses another type as a base multiple times, and at least
one appearance is _not_ virtual, then catches with that base will be
skipped when that first type is thrown. Imagine what happens if
"enable_error_info" is applied multiple times during an exception
session and/or the original exception object used "boost::exception".

Daryle Walker
Mac, Internet, and Video Game Junkie
darylew AT hotmail DOT com

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