![]() |
Fehler bei Verwendung von try/except
Liste der Anhänge anzeigen (Anzahl: 3)
Hallöle...8-)
Ich habe einen Exception Block, falls die Datei nicht geöffnet werden kann. (Bild1 - Fehler den ich erwarte) Nach der Fortsetzung in der IDE bekomme ich einen Fehler den ich nicht kenne...:gruebel: Könnte mir jemand die Fehlermeldung erklären? (Bild2) Ich komme in den Exception Block noch nicht mal rein. :shock: (Bild3) Mit Ok komme ich in die CPU Ansicht! :roll: Danke... |
AW: Fehler bei Verwendung von try/except
Was ist den List?
|
AW: Fehler bei Verwendung von try/except
Schon 12.2 Patch1 eingespielt?
Publicly Reported Issues Addressed by this Patch This patch addresses the following public reports on Quality Portal ( ![]() RSS-698 Try catch finally bug under win64x |
AW: Fehler bei Verwendung von try/except
Hallo...
Zitat:
Zitat:
PS: das ist nicht das erste try/exept im Programm :wink: |
AW: Fehler bei Verwendung von try/except
Ist der List überhaupt erstellt?
|
AW: Fehler bei Verwendung von try/except
Ist da eine DLL mit im Spiel?
Dein Except-Block, bzw. das ON ist auf Exception-Typ und Nachfahren eingeschränkt, und wenn es was anderes ist, wobei auch der Exception-Typ einer anderen DLL was Anderes ist, wenn (normal) die TypeInfos/RTTI nicht durch das RTL-Runtimepackage gleichgeschaltet sind. |
AW: Fehler bei Verwendung von try/except
Liste der Anhänge anzeigen (Anzahl: 1)
Danke...
Zitat:
Zitat:
Ich habe diese Prüfung auf "Keinen Zugriff" erst jetzt um das List.LoadFromFile herumgebaut...damit nicht der MadExcept 1 Mal im Jahr an dieser Stelle aufpoppt. :zwinker: Original:
Delphi-Quellcode:
Wer kennt diesen Fehler? :?
if FDialog.Execute(Parent.Handle) then
begin FPreferences.PreferencesCommon.ImportCsvEMCOTFolder := ExtractFilePath(FDialog.FileName); FPreferences.SavePreferences; List.LoadFromFile(FDialog.FileName); FileNameComplete := FDialog.FileName; // Prüfung ob schon eingelesen FileName := ExtractFileName(FileNameComplete); FileNameBackup := FileName; ... // ca. 15 Zeilen weiter in der gleichen "procedure" ohne Fehler ... except on E: Exception do begin if Assigned(FOnEndImport) then begin FOnEndImport(Self); end; DMZU.Database.TransactionRollback; if Assigned(FOnImportError) then begin Error := TKTEError.Create; try Error.ErrorType := etMisc; Error.ErrorStrings.Text := E.Message; FOnImportError(Self, Error); finally Error.Free; end; end; end; end; Kommando zurück! :roll: Ein 2. Delphi Neustart hat es gebracht. :evil: Jetzt wird auch der Block ausgeführt und die Fehlermeldung in der Oberfläche angezeigt. Ich hasse es. :evil: Danke fürs Zuhören...:wink: |
AW: Fehler bei Verwendung von try/except
|
AW: Fehler bei Verwendung von try/except
Danke...ist erledigt. :wink: War wie du schon erwähnt hast...Delphi! :roll:
|
AW: Fehler bei Verwendung von try/except
@haentschman ,
With Delphi compiler changes, it really could be a bug, i don't have the latest Delphi IDEs so i can't say, but here few thoughts on your code and your approach from what i know : 1) Remove the need for the nested try..except around try..finally because in theory finally should start the local procedure and it should end it, so it could be a bug, but what ever the case is, your code is calling FOnImportError , why ? You could refactor this into clearer code, by introducing DoError or DoImportError with any needed parameters, and form there you can put creating your custom error and free it with try..finally block. 2) the code when exception being raised is calling FOnEndImport before FOnImportError, i think this is wrong approach, just in case you needed to check the detail of the import from the Error handler but being End called before is a risk of confusing the data and logic flow. 3) Yes as mentioned above and from David answer on SO, 0EEDFADE is Delphi specific exception, but being captured by the OS and the OS didn't forwarded to the application for many reasons, among them the stack is being corrupted or the exception structure has been malformed by wrong parameter(s) in the SEH record, this easily could be a bug in generated code where finally block invoked and did overwrite the the except block, but also could be EurekaLog or MadShi hooked the handled exception and caused this corruption. in all cases i see a simple and small refactor could easily remove this in full and solve your code issue. |
Alle Zeitangaben in WEZ +1. Es ist jetzt 08:42 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz