[fpc-devel] closefile() errorhandling changed

Marco van de Voort marcov at stack.nl
Sun Jun 25 13:52:00 CEST 2006


Hi, 

I just fixed a bug, which might have confusing effects on existing code.
The change is more delphi compatible, so if your code already works on both,
you can skip it.

Bug 6279 involves removing IO checking from (objpas.)closefile() (which is a
delphi wrapper over system.close()). 

So originally, the closefile would simply closed the file if possible, and
never raised exceptions. 

Now it uses the global {$I} state, so it might be possible that code with
not enough checking that didn't generate exceptions before on closefile()
now starts raising them.  
The emergency workaround is to put {$I-} {$I+} or try except handling around
them.




More information about the fpc-devel mailing list