Einzelnen Beitrag anzeigen

Benutzerbild von Luckie
Luckie

Registriert seit: 29. Mai 2002
37.621 Beiträge
 
Delphi 2006 Professional
 
#10

Re: Eigene Klasse mit eigener Fehlerbehandlung ausstatten

  Alt 17. Dez 2003, 16:58
Eins noch: Wie muss der EFileSplitter Constructur aussehen, damit ich ein Parameter Array übergeben kann wie der normalen CraeteFm Methode von der Klasse Exception?

Habs:
Delphi-Quellcode:
type
  TOnError = procedure(Sender: TObject; ECode: Integer; EMessage: string) of
    object;
  EFileSplitterError = class(Exception)
  protected
    FErrorCode : Integer;
  public
    constructor CreateError(const AErrCode: Integer; const AMessage: string;
      const Arg: array of const); reintroduce; virtual;
    property ErrorCode: Integer read FErrorCode;
  end;
Delphi-Quellcode:
constructor EFileSplitterError.CreateError(const AErrCode: Integer;
     const AMessage: string; const Arg: array of const);
begin
  inherited CreateFmt(AMessage, Arg);
  FErrorCode := AErrCode;
end;
Michael
Ein Teil meines Codes würde euch verunsichern.
  Mit Zitat antworten Zitat