Boost logo

Boost :

From: Eugene Karpachov (jk_at_[hidden])
Date: 2001-03-21 01:36:38


Tue, Mar 20, 2001 at 07:41:15PM -0500, David Abrahams ÐÉÛÅÔ:
> From: "Aleksey Gurtovoy" <alexy_at_[hidden]>
>
> > As for me, I for sure don't want the application and even the document I
> am
> > editing to be closed just because 'Ctrl-C' for some reason did not place
> > anything into clipboard buffer ;).
>
> Obviously not every exception deserves the same response. Wouldn't it be a
> good idea to notify the user that the copy didn't work? This might be
> especially important if the application were, say, an image editor...

Why not to use policy technique? Something like

        verified_call(bind(OpenClipboard, 0), ThrowSomeExceptionPolicy());
        verified_call(CloseClipboard, AbortPolicy());

I have some draft, but I'm not posting it here, because the idea is obvious,
I think.

-- 
jk

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