Use Horde_Exception here, not Exception
authorMichael M Slusarz <slusarz@curecanti.org>
Mon, 22 Jun 2009 04:08:46 +0000 (22:08 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Mon, 22 Jun 2009 04:08:46 +0000 (22:08 -0600)
framework/SpellChecker/lib/Horde/SpellChecker.php
framework/SpellChecker/lib/Horde/SpellChecker/Aspell.php

index 4e8b903..e2423df 100644 (file)
@@ -63,13 +63,13 @@ abstract class Horde_SpellChecker
      *
      * @return Horde_SpellChecker  The newly created Horde_SpellChecker
      *                             instance.
-     * @throws Exception
+     * @throws Horde_Exception
      */
     static public function getInstance($driver, $params = array())
     {
         $class = 'Horde_SpellChecker_' . Horde_String::ucfirst(basename($driver));
         if (!class_exists($class)) {
-            throw new Exception('Driver ' . $driver . ' not found');
+            throw new Horde_Exception('Driver ' . $driver . ' not found');
         }
         return new $class($params);
     }
@@ -101,7 +101,7 @@ abstract class Horde_SpellChecker
      * @param string $text  TODO
      *
      * @return array  TODO
-     * @throws Exception
+     * @throws Horde_Exception
      */
     abstract public function spellCheck($text);
 
index 4597452..ee5062b 100644 (file)
@@ -20,7 +20,7 @@ class Horde_SpellChecker_Aspell extends Horde_SpellChecker
      * @param string $text  TODO
      *
      * @return array  TODO
-     * @throws Exception
+     * @throws Horde_Exception
      */
     public function spellCheck($text)
     {
@@ -43,7 +43,7 @@ class Horde_SpellChecker_Aspell extends Horde_SpellChecker
 
         $process = proc_open($this->_cmd(), $descspec, $pipes);
         if (!is_resource($process)) {
-            throw Exception('Spellcheck failed. Command line: ', $this->_cmd());
+            throw new Horde_Exception('Spellcheck failed. Command line: ', $this->_cmd());
         }
 
         require_once 'Horde/NLS.php';
@@ -80,7 +80,7 @@ class Horde_SpellChecker_Aspell extends Horde_SpellChecker
             if ($this->_encoding) {
                 $err = Horde_String::convertCharset($err, $this->_encoding, $charset);
             }
-            throw Exception('Spellcheck failed. Command line: ', $this->_cmd());
+            throw new Horde_Exception('Spellcheck failed. Command line: ', $this->_cmd());
         }
 
         if ($this->_encoding) {