Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Object-Pascal / Delphi-Language (https://www.delphipraxis.net/32-object-pascal-delphi-language/)
-   -   Delphi GetClass/FindClass für Exceptions? (https://www.delphipraxis.net/62046-getclass-findclass-fuer-exceptions.html)

Meta777 30. Jan 2006 11:56


GetClass/FindClass für Exceptions?
 
Huhu,

gibts denn sowas wie GetClass / FindClass auch für Exceptions?? :gruebel:
Also ich hab folgendes vor: :stupid:

Delphi-Quellcode:
function ShowError(FehlerClass, FehlerMsg: String): Boolean;
var
  ExcptCls: ExceptClass;
begin
  ExcptCls := GetExceptionClass(Fehler);//Dat wär schon
  ExcptCls.Create(FehlerMsg);//joa exception dann auslösen...
end;
TIA

Gottes Segen

Khabarakh 30. Jan 2006 12:42

Re: GetClass/FindClass für Exceptions?
 
Ich kenne keine Möglichkeit. Es sollte auch keine geben, da die Delphi-RTTI erst bei TPersistent anfängt, Exception aber direkt von TObject ableitet (wer will schon eine Ausnahme streamen :stupid: ?). Wäre das nicht so, würde es auch mit GetClass funktionieren.


Alle Zeitangaben in WEZ +1. Es ist jetzt 12:32 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz