Added MAILBOX_NOOPEN Exception error code
authorMichael M Slusarz <slusarz@curecanti.org>
Wed, 8 Sep 2010 05:40:05 +0000 (23:40 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Wed, 8 Sep 2010 05:40:05 +0000 (23:40 -0600)
framework/Imap_Client/lib/Horde/Imap/Client/Exception.php
framework/Imap_Client/lib/Horde/Imap/Client/Socket.php

index 5ccdad7..6b7c355 100644 (file)
@@ -15,6 +15,7 @@
 class Horde_Imap_Client_Exception extends Exception
 {
     /* Error message codes. */
+
     // Unspecified error (default)
     const UNSPECIFIED = 0;
 
@@ -63,6 +64,7 @@ class Horde_Imap_Client_Exception extends Exception
     // Thrown on CATENATE if the message was too big.
     const CATENATE_TOOBIG = 14;
 
+
     // Login failures
 
     // Could not start mandatory TLS connection.
@@ -86,4 +88,10 @@ class Horde_Imap_Client_Exception extends Exception
     // Login requires privacy.
     const LOGIN_PRIVACYREQUIRED = 21;
 
+
+    // Mailbox access failures
+
+    // Could not open/access mailbox
+    const MAILBOX_NOOPEN = 22;
+
 }
index aac156f..a24ce3c 100644 (file)
@@ -868,6 +868,7 @@ class Horde_Imap_Client_Socket extends Horde_Imap_Client_Base
                 ($this->_temp['parseresperr']['response'] == 'NO')) {
                 $this->_selected = null;
                 $this->_mode = 0;
+                $this->_exception($e->getMessage(), 'MAILBOX_NOOPEN');
             }
             throw $e;
         }