|
Boost : |
From: Dean Michael Berris (mikhailberis_at_[hidden])
Date: 2006-07-10 04:53:45
On 7/8/06, Jeremy Day <jeremy.day_at_[hidden]> wrote:
>
> I'm all for doing whatever possible to keep library users from inadvertantly
> doing stupid things, but I personally feel that in this case the benefits of
> using a pointer (being able to catch old exceptions and test for the
> optional exception_info) outweigh the dangers of users potentially doing
> something ridiculous with the exception_info pointer.
>
With my example implementation of exception_info and
get_exception_info which returns (always) a reference to
exception_info, you achieve the same without having the user expect to
retrieve a pointer -- with which you can get wrong a lot of times,
compared to using references. So you get the best of both worlds. ;)
-- Dean Michael C. Berris C/C++ Software Architect Orange and Bronze Software Labs http://3w-agility.blogspot.com/ http://cplusplus-soup.blogspot.com/ Mobile: +639287291459 Email: dean [at] orangeandbronze [dot] com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk