
14 Nov
2006
14 Nov
'06
6:38 p.m.
David Abrahams wrote:
"Peter Dimov" <pdimov@mmltd.net> writes:
David Abrahams wrote:
"Peter Dimov" <pdimov@mmltd.net> writes:
Moving the catch clause to a destructor doesn't seem an improvement to me.
Using a catch clause to add information to a propagating exception feels syntactically heavy to me, but of course others may disagree. And it may also be that without language support, there's not really a good way to avoid that weight. I'm just expressing an aesthetic preference here.
Won't you need to prepare all the extra information even if nothing throws?
No, you could do it lazily.
I'm afraid that I need to be shown an example in order to "get it". :-)