Fix Exception calling.
authorJan Schneider <jan@horde.org>
Sun, 14 Feb 2010 22:39:10 +0000 (23:39 +0100)
committerJan Schneider <jan@horde.org>
Sun, 14 Feb 2010 22:39:44 +0000 (23:39 +0100)
framework/Block/lib/Horde/Block/Layout/Manager.php
framework/Crypt/lib/Horde/Crypt/Pgp.php
framework/Crypt/lib/Horde/Crypt/Smime.php
imp/config/hooks.php.dist
imp/lib/Compose.php
imp/lib/Imap/Tree.php
imp/lib/Quota/Command.php
imp/lib/Quota/Hook.php
imp/lib/Quota/Imap.php
imp/lib/Quota/Mdaemon.php
imp/lib/Quota/Mercury32.php

index b1d9c6d..3732f9d 100644 (file)
@@ -869,7 +869,7 @@ class Horde_Block_Layout_Manager extends Horde_Block_Layout
                         return;
                     }
                     // Nowhere to go.
-                    throw new Horde_Exception('Shrink or move neighboring block(s) out of the way first', 'horde.warning');
+                    throw new Horde_Exception('Shrink or move neighboring block(s) out of the way first');
                 }
             }
 
@@ -933,7 +933,7 @@ class Horde_Block_Layout_Manager extends Horde_Block_Layout
                         return;
                     }
                     // No where to go
-                    throw new Horde_Exception('Shrink or move neighbouring block(s) out of the way first', 'horde.warning');
+                    throw new Horde_Exception('Shrink or move neighbouring block(s) out of the way first');
                 }
             }
         } else {
@@ -1026,7 +1026,7 @@ class Horde_Block_Layout_Manager extends Horde_Block_Layout
                         return;
                     }
                     // No where to go
-                    throw new Horde_Exception('Shrink or move neighboring block(s) out of the way first', 'horde.warning');
+                    throw new Horde_Exception('Shrink or move neighboring block(s) out of the way first');
                 }
             }
 
@@ -1093,7 +1093,7 @@ class Horde_Block_Layout_Manager extends Horde_Block_Layout
                         return;
                     }
                     // No where to go
-                    throw new Horde_Exception('Shrink or move neighboring block(s) out of the way first', 'horde.warning');
+                    throw new Horde_Exception('Shrink or move neighboring block(s) out of the way first');
                 }
             }
         } else {
@@ -1162,7 +1162,7 @@ class Horde_Block_Layout_Manager extends Horde_Block_Layout
             for ($i = 0; $i < $width; $i++) {
                 if (!$this->isEmpty($row - 1, $col + $i)) {
                     if (!$this->moveDownBelow($row - 1)) {
-                        throw new Horde_Exception('Shrink or move neighboring block(s) out of the way first', 'horde.warning');
+                        throw new Horde_Exception('Shrink or move neighboring block(s) out of the way first');
                     } else {
                         $row++;
                     }
@@ -1204,7 +1204,7 @@ class Horde_Block_Layout_Manager extends Horde_Block_Layout
             for ($i = 0; $i < $width; $i++) {
                 if (!$this->isEmpty($lastrow + 1, $col + $i)) {
                     if (!$this->moveDownBelow($lastrow)) {
-                        throw new Horde_Exception('Shrink or move neighboring block(s) out of the way first', 'horde.warning');
+                        throw new Horde_Exception('Shrink or move neighboring block(s) out of the way first');
                     }
                 }
             }
@@ -1235,7 +1235,7 @@ class Horde_Block_Layout_Manager extends Horde_Block_Layout
             for ($i = 0; $i < $height; $i++) {
                 if (!$this->isEmpty($row + $i, $col - 1)) {
                     if (!$this->moveRightAfter($col - 1)) {
-                        throw new Horde_Exception('Shrink or move neighboring block(s) out of the way first', 'horde.warning');
+                        throw new Horde_Exception('Shrink or move neighboring block(s) out of the way first');
                     } else {
                         $col++;
                     }
@@ -1270,7 +1270,7 @@ class Horde_Block_Layout_Manager extends Horde_Block_Layout
             for ($i = 0; $i < $height; $i++) {
                 if (!$this->isEmpty($row + $i, $lastcol + 1)) {
                     if (!$this->moveRightAfter($lastcol)) {
-                        throw new Horde_Exception('Shrink or move neighbouring block(s) out of the way first', 'horde.warning');
+                        throw new Horde_Exception('Shrink or move neighbouring block(s) out of the way first');
                     }
                 }
             }
index b4ab9a5..03fd21a 100644 (file)
@@ -767,7 +767,7 @@ class Horde_Crypt_Pgp extends Horde_Crypt
         try {
             $this->getPublicKeyserver($info['keyid'], $server, $timeout);
         } catch (Horde_Exception $e) {
-            throw new Horde_Exception(_("Key already exists on the public keyserver."), 'horde.warning');
+            throw new Horde_Exception(_("Key already exists on the public keyserver."));
         }
 
         /* Connect to the public keyserver. _connectKeyserver() */
index dd6e680..bf97949 100644 (file)
@@ -194,7 +194,7 @@ class Horde_Crypt_Smime extends Horde_Crypt
         $result = openssl_pkcs7_verify($input, PKCS7_NOVERIFY, $output);
 
         if ($result === true) {
-            throw new Horde_Exception(_("Message Verified Successfully but the signer's certificate could not be verified."), 'horde.warning');
+            throw new Horde_Exception(_("Message Verified Successfully but the signer's certificate could not be verified."));
         } elseif ($result == -1) {
             throw new Horde_Exception(_("Verification failed - an unknown error has occurred."));
         } else {
index 02146e2..4170eda 100644 (file)
@@ -560,11 +560,11 @@ class IMP_Hooks
 //
 //        $session = ssh2_connect($host);
 //        if (!$session) {
-//            throw new IMP_Exception(_("Connection to server failed."), 'horde.error');
+//            throw new IMP_Exception(_("Connection to server failed."));
 //        }
 //
 //        if (!ssh2_auth_password($session, $user, $pass)) {
-//            throw new IMP_Exception(_("Authentication failed."), 'horde.error');
+//            throw new IMP_Exception(_("Authentication failed."));
 //        }
 //
 //        $stream = ssh2_exec($session, $command, false);
index 3ed84f8..c2fa9e5 100644 (file)
@@ -1172,7 +1172,7 @@ class IMP_Compose
                 /* Check to see if we have the user's passphrase yet. */
                 $passphrase = $imp_pgp->getPassphrase('personal');
                 if (empty($passphrase)) {
-                    $e = new IMP_Compose_Exception(_("PGP: Need passphrase for personal private key."), 'horde.message');
+                    $e = new IMP_Compose_Exception(_("PGP: Need passphrase for personal private key."));
                     $e->encrypt = 'pgp_passphrase_dialog';
                     throw $e;
                 }
@@ -1184,7 +1184,7 @@ class IMP_Compose
                  * yet. */
                 $symmetric_passphrase = $imp_pgp->getPassphrase('symmetric', 'imp_compose_' . $this->_cacheid);
                 if (empty($symmetric_passphrase)) {
-                    $e = new IMP_Compose_Exception(_("PGP: Need passphrase to encrypt your message with."), 'horde.message');
+                    $e = new IMP_Compose_Exception(_("PGP: Need passphrase to encrypt your message with."));
                     $e->encrypt = 'pgp_symmetric_passphrase_dialog';
                     throw $e;
                 }
@@ -1225,7 +1225,7 @@ class IMP_Compose
             if (in_array($encrypt, array(IMP::SMIME_SIGN, IMP::SMIME_SIGNENC))) {
                 $passphrase = $imp_smime->getPassphrase();
                 if ($passphrase === false) {
-                    $e = new IMP_Compose_Exception(_("S/MIME Error: Need passphrase for personal private key."), 'horde.error');
+                    $e = new IMP_Compose_Exception(_("S/MIME Error: Need passphrase for personal private key."));
                     $e->encrypt = 'smime_passphrase_dialog';
                     throw $e;
                 }
@@ -1744,7 +1744,7 @@ class IMP_Compose
         /* Check for filesize limitations. */
         if (!empty($conf['compose']['attach_size_limit']) &&
             (($conf['compose']['attach_size_limit'] - $this->sizeOfAttachments() - $_FILES[$name]['size']) < 0)) {
-            throw new IMP_Compose_Exception(sprintf(_("Attached file \"%s\" exceeds the attachment size limits. File NOT attached."), $filename), 'horde.error');
+            throw new IMP_Compose_Exception(sprintf(_("Attached file \"%s\" exceeds the attachment size limits. File NOT attached."), $filename));
         }
 
         /* Determine the MIME type of the data. */
@@ -1778,7 +1778,7 @@ class IMP_Compose
         } else {
             $attachment = Horde::getTempFile('impatt', false);
             if (move_uploaded_file($tempfile, $attachment) === false) {
-                throw new IMP_Compose_Exception(sprintf(_("The file %s could not be attached."), $filename), 'horde.error');
+                throw new IMP_Compose_Exception(sprintf(_("The file %s could not be attached."), $filename));
             }
         }
 
@@ -1822,7 +1822,7 @@ class IMP_Compose
             $attachment = Horde::getTempFile('impatt', false);
             $res = file_put_contents($attachment, $part->getContents());
             if ($res === false) {
-                throw new IMP_Compose_Exception(sprintf(_("Could not attach %s to the message."), $part->getName()), 'horde.error');
+                throw new IMP_Compose_Exception(sprintf(_("Could not attach %s to the message."), $part->getName()));
             }
 
             if (($type == 'application/octet-stream') &&
@@ -1842,7 +1842,7 @@ class IMP_Compose
         /* Check for filesize limitations. */
         if (!empty($conf['compose']['attach_size_limit']) &&
             (($conf['compose']['attach_size_limit'] - $this->sizeOfAttachments() - $bytes) < 0)) {
-            throw new IMP_Compose_Exception(sprintf(_("Attached file \"%s\" exceeds the attachment size limits. File NOT attached."), $part->getName()), 'horde.error');
+            throw new IMP_Compose_Exception(sprintf(_("Attached file \"%s\" exceeds the attachment size limits. File NOT attached."), $part->getName()));
         }
 
         /* Store the data. */
index efa60c9..8f89538 100644 (file)
@@ -2038,7 +2038,7 @@ class IMP_Imap_Tree
                     return $new;
                 }
             }
-            throw new Horde_Exception(_("Cannot directly create mailbox in this folder."), 'horde.error');
+            throw new Horde_Exception(_("Cannot directly create mailbox in this folder."));
         }
 
         $mbox = $ns_info['name'];
index fec3d71..6cbeee8 100644 (file)
@@ -88,7 +88,7 @@ class IMP_Quota_Command extends IMP_Quota
                         'limit' => $quota[2] * $blocksize);
         }
 
-        throw new Horde_Exception(_("Unable to retrieve quota"), 'horde.error');
+        throw new Horde_Exception(_("Unable to retrieve quota"));
     }
 
 }
index e1976f7..7d62a9c 100644 (file)
@@ -37,7 +37,7 @@ class IMP_Quota_Hook extends IMP_Quota
 
         if (count($quota) != 2) {
             Horde::logMessage('Incorrect number of return values from quota hook.', __FILE__, __LINE__, PEAR_LOG_ERR);
-            throw new Horde_Exception(_("Unable to retrieve quota"), 'horde.error');
+            throw new Horde_Exception(_("Unable to retrieve quota"));
         }
 
         return array('usage' => $quota[0], 'limit' => $quota[1]);
index ad5c157..e5f5c73 100644 (file)
@@ -28,7 +28,7 @@ class IMP_Quota_Imap extends IMP_Quota
         try {
             $quota = $GLOBALS['imp_imap']->ob()->getQuotaRoot($GLOBALS['imp_search']->isSearchMbox($GLOBALS['imp_mbox']['mailbox']) ? 'INBOX' : $GLOBALS['imp_mbox']['mailbox']);
         } catch (Horde_Imap_Client_Exception $e) {
-            throw new Horde_Exception(_("Unable to retrieve quota"), 'horde.error');
+            throw new Horde_Exception(_("Unable to retrieve quota"));
         }
 
         if (empty($quota)) {
index 30c9dd5..9ce8adb 100644 (file)
@@ -43,7 +43,7 @@ class IMP_Quota_Mdaemon extends IMP_Quota
             }
         }
 
-        throw new Horde_Exception(_("Unable to retrieve quota"), 'horde.error');
+        throw new Horde_Exception(_("Unable to retrieve quota"));
     }
 
     /**
index 4a4cc99..c6738a5 100644 (file)
@@ -59,7 +59,7 @@ class IMP_Quota_Mercury32 extends IMP_Quota
             }
         }
 
-        throw new Horde_Exception(_("Unable to retrieve quota"), 'horde.error');
+        throw new Horde_Exception(_("Unable to retrieve quota"));
     }
 
 }