John,
Yes, this feature has been around for awhile in Microsoft platforms. I
agree that it would be nicer if open() were to fail instead of write(), but
we depend on our underlying C library functions to tell us when something
is wrong. I think Susie Jeffery already wrote you with the advice I gave
her awhile back, which was that you can use &error to convert a runtime
error in write() into a failure. However, it might not be wise to just set
&error for your whole program run, it is better to use it sparingly for
specific calls or sections of code.
Cheers,
Clint
On Sat, Sep 22, 2012 at 9:28 AM, John Sampson <[email protected]> wrote:
>
> A program of mine crashed recently when it tried to write to a text file
> which was already open in Microsoft Word (running in Windows 7).
>
> I would have thought this error would be caught when opening the file
> rather than when writing to it. Has anyone else noticed this behaviour?
>
------------------------------------------------------------------------------
How fast is your code?
3 out of 4 devs don\\\'t know how their code performs in production.
Find out how slow your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219672;13503038;z?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
Unicon-group mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/unicon-group