Boost logo

Boost :

From: Kevin Sopp (baraclese_at_[hidden])
Date: 2006-07-04 08:45:05


>From: "Bronek Kozicki" <brok_at_[hidden]>
>Now you see the problem, but if these lines are in two separate
>locations (as is often the case with throw ... catch) it will be much
>more difficult to diagnose. Futhermore, tags provide nice clue that
>there are some data specific to exception being passed - just like
>exception hierarchy does. Last but not least, forward declarations have
>a nice property that they can be declared in multiple locations (no need
>for central location) and compiler will verify that they are used
>uniformly.

The compiler cannot check that the right tag is used since information is
added to the exception at runtime, so you're still vulnerable to typos. That
means you would still have to either put the tags or static strings in a
central header file to unify the exception handling code at the throw/catch
site.

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


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