From: Michael M Slusarz Date: Wed, 8 Sep 2010 05:57:40 +0000 (-0600) Subject: Better error message X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=1c801baac1864cafc665419b5bb522e0085fcdf8;p=horde.git Better error message --- diff --git a/imp/lib/Ajax/Application.php b/imp/lib/Ajax/Application.php index 9fbed6763..da89dd2b4 100644 --- a/imp/lib/Ajax/Application.php +++ b/imp/lib/Ajax/Application.php @@ -1912,7 +1912,11 @@ class IMP_Ajax_Application extends Horde_Core_Ajax_Application try { $GLOBALS['injector']->getInstance('IMP_Imap')->getOb()->openMailbox($this->_vars->view, $rw ? Horde_Imap_Client::OPEN_READWRITE : Horde_Imap_Client::OPEN_AUTO); } catch (Horde_Imap_Client_Exception $e) { - $GLOBALS['notification']->push($e); + if ($e->getCode() == Horde_Imap_Client_Exception::MAILBOX_NOOPEN) { + $GLOBALS['notification']->push(sprintf(_("Could not open mailbox \"%s\"."), $this->_vars->view), 'horde.error'); + } else { + $GLOBALS['notification']->push($e, 'horde.error'); + } return null; } }