From: Michael M Slusarz Date: Tue, 3 Mar 2009 04:45:19 +0000 (-0700) Subject: Add server connect exception code. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=0ae9e6e98ff20cc10984b86d211ac8508c303108;p=horde.git Add server connect exception code. --- diff --git a/framework/Imap_Client/lib/Horde/Imap/Client/Exception.php b/framework/Imap_Client/lib/Horde/Imap/Client/Exception.php index 00f2b26f8..07230f0d6 100644 --- a/framework/Imap_Client/lib/Horde/Imap/Client/Exception.php +++ b/framework/Imap_Client/lib/Horde/Imap/Client/Exception.php @@ -53,6 +53,9 @@ class Horde_Imap_Client_Exception extends Exception // Thrown if the cache has become invalid. const CACHEUIDINVALID = 11; + // Thrown if server denies the network connection. + const SERVER_CONNECT = 12; + /** * Define a callback function used to log the exception. Will be passed * a single parameter - a copy of this object. diff --git a/framework/Imap_Client/lib/Horde/Imap/Client/Socket.php b/framework/Imap_Client/lib/Horde/Imap/Client/Socket.php index 5d67e0006..88ab9de7d 100644 --- a/framework/Imap_Client/lib/Horde/Imap/Client/Socket.php +++ b/framework/Imap_Client/lib/Horde/Imap/Client/Socket.php @@ -425,7 +425,7 @@ class Horde_Imap_Client_Socket extends Horde_Imap_Client_Base if ($this->_stream === false) { $this->_stream = null; $this->_isSecure = false; - throw new Horde_Imap_Client_Exception('Error connecting to IMAP server: [' . $error_number . '] ' . $error_string); + throw new Horde_Imap_Client_Exception('Error connecting to IMAP server: [' . $error_number . '] ' . $error_string, Horde_Imap_Client_Exception::SERVER_CONNECT); } stream_set_timeout($this->_stream, $this->_params['timeout']);