From: Marshall Clow (marshall_at_[hidden])
Date: 2001-03-20 18:23:06
>> I disagree. Given the calling sequence, it is guaranteed that all the
>> will succeed if both the OS environment and your program are in consistent
>> state (no leaked/invalid handles, no corrupted memory regions etc.). If
>> are not, it's a problem of a code that put your program/OS into such
>> but for sure not the 'clipboard::put_text' function; assertions in that
>> function only help to detect such problems early and track their sources
>> more easily, but generally you better to find the real bugs instead of
>> trying to live with their consequences. In any case, throwing the
>> here doesn't give you anything, except that it forces all clients of the
>> function to wrap the 'put_text' call into try-catch block that will be
>Then there is no point to the "VERIFY" calls either. The program will crash,
>you will be running the debugger anyway so you can see that you blew it.
A better way to say it is "the program will probably crash at some time in the future".
I much prefer to be notified as soon as something is wrong (or as soon as I can see something wrong).
Yes, having ::OpenClipboard fail may be symptomatic of something else, but it is a
definite indication that something is wrong. I like being notified "right now".
-- -- Marshall Marshall Clow Idio Software <mailto:mclow_at_[hidden]> It is by caffeine alone I set my mind in motion. It is by the beans of Java that thoughts acquire speed, the hands acquire shaking, the shaking becomes a warning. It is by caffeine alone I set my mind in motion.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk