Browse Source

[ZF-8163] Zend_Mail_Protocol_Imap connect method throws possibly misleading exception message on socket open failure

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@18730 44c647ce-9c0f-0410-b52a-842ac1e357ba
yoshida@zend.co.jp 16 years ago
parent
commit
70a6677ee0
2 changed files with 4 additions and 2 deletions
  1. 2 1
      library/Zend/Mail/Protocol/Imap.php
  2. 2 1
      library/Zend/Mail/Protocol/Pop3.php

+ 2 - 1
library/Zend/Mail/Protocol/Imap.php

@@ -97,7 +97,8 @@ class Zend_Mail_Protocol_Imap
              * @see Zend_Mail_Protocol_Exception
              */
             require_once 'Zend/Mail/Protocol/Exception.php';
-            throw new Zend_Mail_Protocol_Exception('cannot connect to host : ' . $errno . ' : ' . $errstr);
+            throw new Zend_Mail_Protocol_Exception('cannot connect to host; error = ' . $errstr .
+                                                   ' (errno = ' . $errno . ' )');
         }
 
         if (!$this->_assumedNextLine('* OK')) {

+ 2 - 1
library/Zend/Mail/Protocol/Pop3.php

@@ -106,7 +106,8 @@ class Zend_Mail_Protocol_Pop3
              * @see Zend_Mail_Protocol_Exception
              */
             require_once 'Zend/Mail/Protocol/Exception.php';
-            throw new Zend_Mail_Protocol_Exception('cannot connect to host : ' . $errno . ' : ' . $errstr);
+            throw new Zend_Mail_Protocol_Exception('cannot connect to host; error = ' . $errstr .
+                                                   ' (errno = ' . $errno . ' )');
         }
 
         $welcome = $this->readResponse();