Re: [boost] Exception Visitor

-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Jeremy Day Sent: Tuesday, July 18, 2006 10:56 AM To: boost@lists.boost.org Subject: Re: [boost] Exception Visitor
On 7/18/06, Sohail Somani <s.somani@fincad.com> wrote:
I just don't see the point, except as an academic exercise
The point is partly academic, as I am working on learning MPL. However, I think that this technique, or some derivation thereof, can help make code more maintainable, since you can reuse my_exception_handler whenever you want to handle the same exception in the same way, even though you catch it in a different place. With catch blocks the only recourse, so far as I can tell, is to basically copy-and-paste the catch code to each location where you need the exception handling code.
This is true. Though I personally tend to use macros for this specific instance.
participants (1)
-
Sohail Somani