Hallo zusammen,
mir steht momentan offensichtlich jemand auf der Leitung:
Delphi-Quelltext
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26:
| procedure TFormMain.WriteLogInfo(Info: String); var CreateLogfile: Boolean; LogDatei: TextFile; begin CreateLogfile := mkConfig.CreateLog;
try if CreateLogfile then begin if FileExists(AppDataDir + 'mk.log') then begin AssignFile(LogDatei, AppDataDir + 'mk.log'); Append(LogDatei); end else begin AssignFile(LogDatei, AppDataDir + 'mk.log'); ReWrite(LogDatei); end; WriteLn(LogDatei, Info); end; finally try CloseFile(LogDatei); except end; Application.ProcessMessages; end; end; |
Wie kann es sein, dass mir das Programm abstürzt mit der Meldung:
exception class : EInOutError
exception message : E/A-Fehler 32.
main thread ($26c):
007a5314 +0b4 bkmaker.exe UnitMain 1840 +7 TFormMain.WriteLogInfo
Da sind doch wirklich alle Dateioperationen in einer try..finally bzw. try..except - hat jemand eine Idee, weshalb er trotzdem in Zeile 1840 (hier Zeile 12: => Append(LogDatei)) eine Exception erstellt?
Danke schonmal!