Delphi-PRAXiS
Seite 2 von 2     12   

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Sonstige Fragen zu Delphi (https://www.delphipraxis.net/19-sonstige-fragen-zu-delphi/)
-   -   Keine Exceptions (https://www.delphipraxis.net/217036-keine-exceptions.html)

Uwe Raabe 14. Apr 2025 15:14

AW: Keine Exceptions
 
Das mag für den except-Block gelten. Bei dem Event wird das aber vorab geprüft.

himitsu 14. Apr 2025 15:34

AW: Keine Exceptions
 
Bei ON wird quasi mit IS geprüft, womit es immer <>nil sein muß.

Wenn nicht explizit auf das Exception-Objekt zugegriffen wird
-> kein ON im Except
und es keine Delphi-Exception ist
-> nicht explitzit raise mit Delphi-Exception
-> z.B. eine System-Exception ala AccessViolation
dann kann das ExceptObject nil sein

auch Exceptions aus DLLs, da kann es NIL sein
oder etwas Anderes, als ein Delphi-Exception-Objekt, bzw. nicht "DIE" Delphi-Exception-ObjectClass (getrennte RTTI/TypeInfos)

Per se muß es nichtmal eine Exception-Klasse sein.
Delphi-Quellcode:
raise TObject.Create;

Delphi-Quellcode:
raise TEdit.Create(nil);

...


Alle Zeitangaben in WEZ +1. Es ist jetzt 21:54 Uhr.
Seite 2 von 2     12   

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