CVS update: /cowiki/includes/cowiki/class/dao/

[email protected] 26 May 2005 23:44:42 -0000
Newsgroups gmane.comp.php.cowiki.cvs
Message-ID <[email protected]>
User: dgorski 
Date: 2005/05/26 16:44:42

Modified:
   cowiki/includes/cowiki/class/dao/class.UserDAOMySQL.php
   cowiki/includes/cowiki/class/dao/class.DocumentDAO.php
   cowiki/includes/cowiki/class/dao/class.CommentDAO.php

Log:
 Simplified StorageException handling

File Changes:

Directory: /cowiki/includes/cowiki/class/dao/
=============================================

File [changed]: class.UserDAOMySQL.php
Url: http://cowiki.tigris.org/source/browse/cowiki/includes/cowiki/class/dao/class.UserDAOMySQL.php?r1=1.25&r2=1.26
Delta lines:  +4 -10
--------------------
--- class.UserDAOMySQL.php	26 May 2005 21:55:48 -0000	1.25
+++ class.UserDAOMySQL.php	26 May 2005 23:44:39 -0000	1.26
@@ -2,7 +2,7 @@
 
 /**
  *
- * $Id: class.UserDAOMySQL.php,v 1.25 2005/05/26 21:55:48 dgorski Exp $
+ * $Id: class.UserDAOMySQL.php,v 1.26 2005/05/26 23:44:39 dgorski Exp $
  *
  * This file is part of coWiki. coWiki is free software under the terms of
  * the GNU General Public License (GPL). Read the LICENSE file. If you did
@@ -17,7 +17,7 @@
  * @author      Daniel T. Gorski, <[email protected]>
  * @copyright   (C) Daniel T. Gorski, {@link http://www.develnet.org}
  * @license     http://www.gnu.org/licenses/gpl.html
- * @version     $Revision: 1.25 $
+ * @version     $Revision: 1.26 $
  *
  */
 
@@ -104,16 +104,10 @@
             $this->Storage = StorageFactory::getInstance()
                                 ->createDocumentStorage($DocResource);
 
-        } catch (StorageConnectionFailureException $scfe) {
-            
-            // Bad failure, halt now
-            $this->Context->addError(551);
-            $this->Context->terminate();
-
         } catch (StorageException $se) {
             
             // Bad failure, halt now
-            $this->Context->addError(540);
+            $this->Context->addError(551, $se->getMessage());
             $this->Context->terminate();
         }
     }

File [changed]: class.DocumentDAO.php
Url: http://cowiki.tigris.org/source/browse/cowiki/includes/cowiki/class/dao/class.DocumentDAO.php?r1=1.71&r2=1.72
Delta lines:  +3 -9
-------------------
--- class.DocumentDAO.php	12 May 2005 21:42:36 -0000	1.71
+++ class.DocumentDAO.php	26 May 2005 23:44:39 -0000	1.72
@@ -2,7 +2,7 @@
 
 /**
  *
- * $Id: class.DocumentDAO.php,v 1.71 2005/05/12 21:42:36 dgorski Exp $
+ * $Id: class.DocumentDAO.php,v 1.72 2005/05/26 23:44:39 dgorski Exp $
  *
  * This file is part of coWiki. coWiki is free software under the terms of
  * the GNU General Public License (GPL). Read the LICENSE file. If you did
@@ -17,7 +17,7 @@
  * @author      Daniel T. Gorski, <[email protected]>
  * @copyright   (C) Daniel T. Gorski, {@link http://www.develnet.org}
  * @license     http://www.gnu.org/licenses/gpl.html
- * @version     $Revision: 1.71 $
+ * @version     $Revision: 1.72 $
  *
  */
 
@@ -98,16 +98,10 @@
             $this->Storage = StorageFactory::getInstance()
                                 ->createDocumentStorage($DocResource);
 
-        } catch (StorageConnectionFailureException $scfe) {
-            
-            // Bad failure, halt now
-            $this->Context->addError(551);
-            $this->Context->terminate();
-
         } catch (StorageException $se) {
             
             // Bad failure, halt now
-            $this->Context->addError(540);
+            $this->Context->addError(551, $se->getMessage());
             $this->Context->terminate();
         }
     }

File [changed]: class.CommentDAO.php
Url: http://cowiki.tigris.org/source/browse/cowiki/includes/cowiki/class/dao/class.CommentDAO.php?r1=1.13&r2=1.14
Delta lines:  +4 -10
--------------------
--- class.CommentDAO.php	12 May 2005 21:42:36 -0000	1.13
+++ class.CommentDAO.php	26 May 2005 23:44:39 -0000	1.14
@@ -2,7 +2,7 @@
 
 /**
  *
- * $Id: class.CommentDAO.php,v 1.13 2005/05/12 21:42:36 dgorski Exp $
+ * $Id: class.CommentDAO.php,v 1.14 2005/05/26 23:44:39 dgorski Exp $
  *
  * This file is part of coWiki. coWiki is free software under the terms of
  * the GNU General Public License (GPL). Read the LICENSE file. If you did
@@ -17,7 +17,7 @@
  * @author      Daniel T. Gorski, <[email protected]>
  * @copyright   (C) Daniel T. Gorski, {@link http://www.develnet.org}
  * @license     http://www.gnu.org/licenses/gpl.html
- * @version     $Revision: 1.13 $
+ * @version     $Revision: 1.14 $
  *
  */
 
@@ -88,16 +88,10 @@
             $this->Storage = StorageFactory::getInstance()
                                 ->createDocumentStorage($DocResource);
 
-        } catch (StorageConnectionFailureException $scfe) {
-            
-            // Bad failure, halt now
-            $this->Context->addError(551);
-            $this->Context->terminate();
-
         } catch (StorageException $se) {
             
             // Bad failure, halt now
-            $this->Context->addError(540);
+            $this->Context->addError(551, $se->getMessage());
             $this->Context->terminate();
         }
     }