Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2006-06

closefile() errorhandling changed

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Marco van de Voort

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.

Reply by email