Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Sonstige Fragen zu Delphi (https://www.delphipraxis.net/19-sonstige-fragen-zu-delphi/)
-   -   TIdPOP3.Connect -> POP3-Fehlernummer ermitteln (https://www.delphipraxis.net/191000-tidpop3-connect-pop3-fehlernummer-ermitteln.html)

hoika 28. Nov 2016 22:11

TIdPOP3.Connect -> POP3-Fehlernummer ermitteln
 
Hallo,
ich verzweifel mal wieder an den Indy-Komponenten.

IdPOP3.Connect mit (absichtlich) falschen Anmeldedaten
liefert mir korrekt "Authentication failed".

Ich hätte aber mal die POP3-Fehlernummer abgefragt,
ohne mich in einigen Ebenthandler zu verewigen.

Delphi-Quellcode:
try
  MyIdPOP3.Connect;
except
  on E: EIdReplyPOP3Error do
  begin
     E.XXX ??? -> POP3-Fehlernummer
  end;
end;
Weiss jemand, wie das geht?

Danke

TiGü 29. Nov 2016 08:31

AW: TIdPOP3.Connect -> POP3-Fehlernummer ermitteln
 
Delphi-Quellcode:
  //This error is for POP3 Protocol reply exceptions
  // SendCmd / GetResponse
  EIdReplyPOP3Error = class(EIdReplyError)
  protected
    FErrorCode : String;
    FEnhancedCode : String;
  public
    constructor CreateError(const AErrorCode: String;
     const AReplyMessage: string; const AEnhancedCode : String = ''); reintroduce; virtual;
    property ErrorCode : String read FErrorCode;
    property EnhancedCode : String read FEnhancedCode;
  end;
Hast du es mal mit den Properties ErrorCode und EnhancedCode versucht? :shock:


Alle Zeitangaben in WEZ +1. Es ist jetzt 03:37 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