Boost logo

Boost :

From: Emil Dotchevski (emil_at_[hidden])
Date: 2007-09-28 05:49:25


> The library provides an exception class that can transport arbitrary
> values, thus freeing the user from designing custom exception classes.

I should clarify that the purpose of the library is not to free users
from writing custom exception classes: after all, exceptions are
caught by type -- not by value -- so to be able to tell one failure
from another, we need to throw different types.

The idea behind the proposed exception library is to move the burden
of storing error codes, file names and other data relevant to a given
failure, from the individual exception classes, to a single base
class.

This way the exception class hierarchy can be implemented entirely in
terms of empty classes while still being able to transport to the
catch site whatever information is necessary to handle a particular
exception.

Emil Dotchevski


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