Boost logo

Boost :

From: Jeremy Day (jeremy.day_at_[hidden])
Date: 2006-07-07 17:54:45


On 7/7/06, Dean Michael Berris <mikhailberis_at_[hidden]> wrote:
>
> But if you're using references, you give a cleaner and more definite
> handle to your data:
>
> exception_info & info (get_exception_info(e));
> info ++; // won't work, unless operator++ is defined for exception_info

If you go with references, what would happen in this situation:

try
{
//Some client code.
throw some_error(); //Note that this exception does not have exception_info
associated with it.
}
catch(some_error& e)
{
exception_info& info(get_exception_info(e)); //The dynamic cast in
get_exception_info returns a null pointer.
}

Jeremy


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