Author: jablko
Date: Thu Sep 24 15:12:59 2009
New Revision: 3518

Log:
Swallow exception trying to save deleted object, temporarily fixes issue 1003

Modified:
   trunk/lib/model/QubitInformationObject.php
   trunk/lib/model/QubitObject.php

Modified: trunk/lib/model/QubitInformationObject.php
==============================================================================
--- trunk/lib/model/QubitInformationObject.php  Thu Sep 24 15:10:21 2009        
(r3517)
+++ trunk/lib/model/QubitInformationObject.php  Thu Sep 24 15:12:59 2009        
(r3518)
@@ -143,7 +143,14 @@
       {
         $event->setIndexOnSave(false);
         $event->setInformationObjectId($this->getId());
-        $event->save();
+
+        try
+        {
+          $event->save();
+        }
+        catch (PropelException $e)
+        {
+        }
       }
     }
 
@@ -154,7 +161,14 @@
       {
         $property->setIndexOnSave(false);
         $property->setObject($this);
-        $property->save();
+
+        try
+        {
+          $property->save();
+        }
+        catch (PropelException $e)
+        {
+        }
       }
     }
 
@@ -166,7 +180,14 @@
       {
         $digitalObject->indexOnSave = false;
         $digitalObject->setInformationObject($this);
-        $digitalObject->save();
+
+        try
+        {
+          $digitalObject->save();
+        }
+        catch (PropelException $e)
+        {
+        }
 
         break; // only save one digital object per info object
       }

Modified: trunk/lib/model/QubitObject.php
==============================================================================
--- trunk/lib/model/QubitObject.php     Thu Sep 24 15:10:21 2009        (r3517)
+++ trunk/lib/model/QubitObject.php     Thu Sep 24 15:12:59 2009        (r3518)
@@ -30,7 +30,14 @@
       {
         $objectTermRelation->setIndexOnSave(false);
         $objectTermRelation->setObject($this);
-        $objectTermRelation->save();
+
+        try
+        {
+          $objectTermRelation->save();
+        }
+        case (PropelException $e)
+        {
+        }
       }
     }
 
@@ -41,7 +48,14 @@
       {
         $note->setIndexOnSave(false);
         $note->setObject($this);
-        $note->save();
+
+        try
+        {
+          $note->save();
+        }
+        case (PropelException $e)
+        {
+        }
       }
     }
 
@@ -52,7 +66,14 @@
       {
         $relation->setIndexOnSave(false);
         $relation->setObject($this);
-        $relation->save();
+
+        try
+        {
+          $relation->save();
+        }
+        case (PropelException $e)
+        {
+        }
       }
     }
 
@@ -63,7 +84,14 @@
       {
         $relation->setIndexOnSave(false);
         $relation->setSubject($this);
-        $relation->save();
+
+        try
+        {
+          $relation->save();
+        }
+        case (PropelException $e)
+        {
+        }
       }
     }
 

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.ca/group/qubit-commits?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to