Add Exception class to Skeleton
authorMichael M Slusarz <slusarz@curecanti.org>
Wed, 19 May 2010 18:05:08 +0000 (12:05 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Wed, 19 May 2010 18:10:32 +0000 (12:10 -0600)
skeleton/lib/Driver.php
skeleton/lib/Driver/Sql.php
skeleton/lib/Exception.php [new file with mode: 0644]

index 295d597..cb42cda 100644 (file)
@@ -32,7 +32,7 @@ class Skeleton_Driver
      *                        or connection parameters a subclass might need.
      *
      * @return Skeleton_Driver  The newly created concrete instance.
-     * @throws Horde_Exception
+     * @throws Skeleton_Exception
      */
     static public function factory($driver = null, $params = null)
     {
@@ -50,7 +50,7 @@ class Skeleton_Driver
             return new $class($params);
         }
 
-        throw new Horde_Exception('Could not find driver ' . $class);
+        throw new Skeleton_Exception('Could not find driver ' . $class);
     }
 
     /**
index 5374ffb..9f6a5d2 100644 (file)
@@ -65,7 +65,7 @@ class Skeleton_Driver_Sql extends Skeleton_Driver
     /**
      * Retrieves the foos from the database.
      *
-     * @throws Horde_Skeleton_Exception
+     * @throws Skeleton_Exception
      */
     public function retrieve()
     {
@@ -77,7 +77,7 @@ class Skeleton_Driver_Sql extends Skeleton_Driver
         try {
             $rows = $this->_db->selectAll($query, $values);
         } catch (Horde_Db_Exception $e) {
-            throw new Horde_Skeleton_Exception($e);
+            throw new Skeleton_Exception($e);
         }
 
         /* Store the retrieved values in the foo variable. */
diff --git a/skeleton/lib/Exception.php b/skeleton/lib/Exception.php
new file mode 100644 (file)
index 0000000..a557fdf
--- /dev/null
@@ -0,0 +1,17 @@
+<?php
+/**
+ * Base exception class for Skeleton.
+ *
+ * Copyright 2010 The Horde Project (http://www.horde.org/)
+ *
+ * See the enclosed file COPYING for license information (GPL). If you
+ * did not receive this file, see http://www.fsf.org/copyleft/gpl.html.
+ *
+ * @author   Your name <you@example.com>
+ * @category Horde
+ * @license  http://www.fsf.org/copyleft/gpl.html GPL
+ * @package  Skeleton
+ */
+class Skeleton_Exception extends Horde_Exception_Prior
+{
+}