Update of /cvsroot/gallery/gallery2/include/test/TestCase In directory usw-pr-cvs1:/tmp/cvs-serv23077/test/TestCase Modified Files: CreateAdminUser.class CreateAlbumItem.class CreateAndDeleteAlbumItem.class CreateAnonymousUser.class CreateDatabase.class CreateGalleryComment.class CreateGalleryItem.class CreateGroupAndUsers.class CreateImageContainer.class CreateNestedAlbumItem.class CreatePhotoItem.class CreateRandomTree.class CreateRandomTreeTiming.class CreateSchema.class DeleteAllItems.class DropDatabase.class EmptyGallery.class LoadAlbumItemTiming.class LockWorld.class ModifyAlbumItem.class ModifyAlbumItemTiming.class Log Message: Modified every occurrence where we return a status code to wrap the current __FILE__ and __LINE__. This allows us to generate a stack trace when an error occurs! This is *very* useful. When something goes wrong we can get output like this: Status: Error (ERROR_NAME_COLLISION) in include/classes/DataContainer.class at line 172 in include/classes/ImageContainer.class at line 128 in include/test/TestCase/CreatePhotoItem.class at line 33 in include/test/TestCase.class at line 22 The stack trace is accurate to the line where we wrapped the error, not the exact line that caused the problem. But, it should get us close enough to figure out the problem. Index: CreateAdminUser.class =================================================================== RCS file: /cvsroot/gallery/gallery2/include/test/TestCase/CreateAdminUser.class,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- CreateAdminUser.class 22 May 2002 04:25:59 -0000 1.2 +++ CreateAdminUser.class 24 May 2002 07:50:20 -0000 1.3 @@ -12,7 +12,7 @@ $user = new GalleryUser(); $ret = $user->create(); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } $user->setPassword('admin'); $user->setFullName('Admin'); @@ -20,7 +20,7 @@ $ret = $user->save(); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } return $gallery->commitCache(); Index: CreateAlbumItem.class =================================================================== RCS file: /cvsroot/gallery/gallery2/include/test/TestCase/CreateAlbumItem.class,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- CreateAlbumItem.class 23 May 2002 09:53:12 -0000 1.12 +++ CreateAlbumItem.class 24 May 2002 07:50:21 -0000 1.13 @@ -12,13 +12,13 @@ print("Creating new album item\n"); $ret = $gallery->lockWorld(); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } $album = new AlbumItem(); $ret = $album->createRoot("test", $gallery->getActiveUserId()); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } $album->setRows(3); @@ -28,19 +28,19 @@ print("SAVE\n"); $ret = $album->save(); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } /* Commit the cache */ $ret = $gallery->commitCache(); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } /* Leggo of our locks */ $ret = $gallery->unlock(); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } return GalleryStatus::success(); Index: CreateAndDeleteAlbumItem.class =================================================================== RCS file: /cvsroot/gallery/gallery2/include/test/TestCase/CreateAndDeleteAlbumItem.class,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- CreateAndDeleteAlbumItem.class 22 May 2002 04:25:59 -0000 1.6 +++ CreateAndDeleteAlbumItem.class 24 May 2002 07:50:21 -0000 1.7 @@ -15,12 +15,12 @@ $gallery->getActiveUserId()); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } $ret = $gallery->lockWorld(); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } /* Add some properties */ @@ -33,30 +33,30 @@ $ret = $album->save(); if ($ret->isError()) { $this->error($ret); - return $ret; + return $ret->wrap(__FILE__, __LINE__); } $ret = $gallery->commitCache(); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } print("DELETE\n"); $ret = $album->delete(); if ($ret->isError()) { $this->error($ret); - return $ret; + return $ret->wrap(__FILE__, __LINE__); } $ret = $gallery->commitCache(); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } /* Leggo of our locks */ $ret = $gallery->unlock(); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } return GalleryStatus::success(); Index: CreateAnonymousUser.class =================================================================== RCS file: /cvsroot/gallery/gallery2/include/test/TestCase/CreateAnonymousUser.class,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- CreateAnonymousUser.class 22 May 2002 04:25:59 -0000 1.2 +++ CreateAnonymousUser.class 24 May 2002 07:50:21 -0000 1.3 @@ -12,14 +12,14 @@ $user = new GalleryUser(); $ret = $user->create(); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } $user->setFullName('Anonymous'); $user->setIsAdmin(false); $ret = $user->save(); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } return $gallery->commitCache(); Index: CreateDatabase.class =================================================================== RCS file: /cvsroot/gallery/gallery2/include/test/TestCase/CreateDatabase.class,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- CreateDatabase.class 22 May 2002 08:30:12 -0000 1.3 +++ CreateDatabase.class 24 May 2002 07:50:21 -0000 1.4 @@ -17,7 +17,7 @@ list($ret, $storage) = $gallery->getStorage(); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } return $storage->createDatabase(); Index: CreateGalleryComment.class =================================================================== RCS file: /cvsroot/gallery/gallery2/include/test/TestCase/CreateGalleryComment.class,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- CreateGalleryComment.class 22 May 2002 08:30:12 -0000 1.5 +++ CreateGalleryComment.class 24 May 2002 07:50:21 -0000 1.6 @@ -13,14 +13,14 @@ /* Lock the world */ $ret = $gallery->lockWorld(); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } /* Create our child */ $comment = new GalleryComment(); $ret = $comment->create($rootId); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } /* Make a change */ @@ -33,13 +33,13 @@ /* Commit the cache */ $ret = $gallery->commitCache(); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } /* Unlock the world */ $ret = $gallery->unlock(); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } return GalleryStatus::success(); Index: CreateGalleryItem.class =================================================================== RCS file: /cvsroot/gallery/gallery2/include/test/TestCase/CreateGalleryItem.class,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- CreateGalleryItem.class 22 May 2002 08:30:12 -0000 1.10 +++ CreateGalleryItem.class 24 May 2002 07:50:21 -0000 1.11 @@ -13,7 +13,7 @@ /* Lock the world */ $ret = $gallery->lockWorld(); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } print("Creating new gallery item\n"); @@ -23,13 +23,13 @@ $gallery->getActiveUserId()); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } print("SAVE\n"); $ret = $item->save(); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } $properties =& $item->getProperties(); @@ -37,13 +37,13 @@ print("SECOND SAVE\n"); $ret = $item->save(); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } /* Commit the cache */ $ret = $gallery->commitCache(); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } $properties =& $item->getProperties(); @@ -52,13 +52,13 @@ print("THIRD SAVE\n"); $ret = $item->save(); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } /* Commit the cache */ $ret = $gallery->commitCache(); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } $properties =& $item->getProperties(); @@ -67,31 +67,31 @@ print("FOURTH SAVE\n"); $ret = $item->save(); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } /* Commit the cache */ $ret = $gallery->commitCache(); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } print("FIFTH SAVE\n"); $ret = $item->save(); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } /* Commit the cache */ $ret = $gallery->commitCache(); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } /* Leggo of our locks */ $ret = $gallery->unlock(); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } return GalleryStatus::success(); Index: CreateGroupAndUsers.class =================================================================== RCS file: /cvsroot/gallery/gallery2/include/test/TestCase/CreateGroupAndUsers.class,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- CreateGroupAndUsers.class 22 May 2002 08:30:12 -0000 1.7 +++ CreateGroupAndUsers.class 24 May 2002 07:50:21 -0000 1.8 @@ -11,20 +11,20 @@ $ret = $gallery->lockWorld(); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } $group = new GalleryGroup(); $ret = $group->create(); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } $group->setName('Group 1'); $user1 = new GalleryUser(); $ret = $user1->create(); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } $user1->setFullName('User 1'); $user1->changePassword('password'); @@ -34,7 +34,7 @@ $user2 = new GalleryUser(); $ret = $user2->create(); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } $user2->setFullName('User 2'); $user2->changePassword('password'); @@ -43,45 +43,45 @@ $ret = $gallery->commitCache(); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } print "<h2>ADD USERS TO GROUP!</h2>"; $ret = $group->addUser($user1->getId()); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } $ret = $group->addUser($user2->getId()); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } $ret = $gallery->commitCache(); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } print "<h2>REMOVE!</h2>"; list ($ret, $user1) = $gallery->loadNucleusById($user1->getId()); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } $ret = $user1->removeFromGroup($group->getId()); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } $ret = $gallery->commitCache(); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } /* Leggo of our locks */ $ret = $gallery->unlock(); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } return GalleryStatus::success(); Index: CreateImageContainer.class =================================================================== RCS file: /cvsroot/gallery/gallery2/include/test/TestCase/CreateImageContainer.class,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- CreateImageContainer.class 22 May 2002 08:30:12 -0000 1.4 +++ CreateImageContainer.class 24 May 2002 07:50:21 -0000 1.5 @@ -13,26 +13,26 @@ /* Lock the root */ $ret = $gallery->lockWorld(); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } $item = new ImageContainer(); $imagePath = dirname(dirname(__FILE__)) . '/data/test1.jpg'; $ret = $item->createFromFile($rootId, $imagePath); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } /* Commit the cache */ $ret = $gallery->commitCache(); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } /* Release our locks */ $ret = $gallery->unlock(); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } return GalleryStatus::success(); Index: CreateNestedAlbumItem.class =================================================================== RCS file: /cvsroot/gallery/gallery2/include/test/TestCase/CreateNestedAlbumItem.class,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- CreateNestedAlbumItem.class 22 May 2002 08:30:12 -0000 1.4 +++ CreateNestedAlbumItem.class 24 May 2002 07:50:21 -0000 1.5 @@ -11,7 +11,7 @@ $ret = $gallery->lockWorld(); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } print("Creating new root album item\n"); @@ -19,7 +19,7 @@ $ret = $rootAlbum->createRoot("nestedRoot", $gallery->getActiveUserId()); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } $parentId = $rootAlbum->getId(); @@ -28,12 +28,12 @@ $ret = $nested[$i]->create($parentId, "nested_$i", $gallery->getActiveUserId()); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } $ret = $nested[$i]->save(); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } $parentId = $nested[$i]->getId(); @@ -42,13 +42,13 @@ /* Commit the cache */ $ret = $gallery->commitCache(); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } /* Leggo of our locks */ $ret = $gallery->unlock(); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } return GalleryStatus::success(); Index: CreatePhotoItem.class =================================================================== RCS file: /cvsroot/gallery/gallery2/include/test/TestCase/CreatePhotoItem.class,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- CreatePhotoItem.class 24 May 2002 07:04:59 -0000 1.5 +++ CreatePhotoItem.class 24 May 2002 07:50:21 -0000 1.6 @@ -13,7 +13,7 @@ /* Lock the world */ $ret = $gallery->lockWorld(); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } print("Creating new photo item\n"); @@ -22,7 +22,7 @@ 'itemPath_' . time(), $gallery->getActiveUserId()); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } /* Put an ImageContainer in our PhotoItem */ @@ -30,7 +30,7 @@ $imagePath = dirname(dirname(__FILE__)) . '/data/test1.gif'; $ret = $image->createFromFile($photo->getId(), $imagePath); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } /* @@ -53,13 +53,13 @@ $thumbnail = new ImageContainer(); $ret = $thumbnail->createDerivative($photo->getId()); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } /* Make it a derivative from the source image */ $ret = $thumbnail->deriveFrom($image->getId(), "scale 200"); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } /* @@ -84,13 +84,13 @@ /* Commit the cache */ $ret = $gallery->commitCache(); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } /* Release our lock */ $ret = $gallery->unlock(); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } /* @@ -99,7 +99,7 @@ */ list ($ret, $bool) = $thumbnail->isCacheCurrent(); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } if ($bool) { @@ -110,7 +110,7 @@ /* Rebuild the cache */ $ret = $thumbnail->rebuildCache(); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } } Index: CreateRandomTree.class =================================================================== RCS file: /cvsroot/gallery/gallery2/include/test/TestCase/CreateRandomTree.class,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- CreateRandomTree.class 23 May 2002 09:53:37 -0000 1.2 +++ CreateRandomTree.class 24 May 2002 07:50:21 -0000 1.3 @@ -19,26 +19,26 @@ $ret = $gallery->lockWorld(); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } while ($this->_itemCount < $this->_maxItems) { $ret = $this->_createRandomAlbum($rootId); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } } /* Commit the cache */ $ret = $gallery->commitCache(); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } /* Leggo of our locks */ $ret = $gallery->unlock(); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } return GalleryStatus::success(); @@ -63,7 +63,7 @@ $this->_randomName(), $gallery->getActiveUserId()); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } $this->_itemCount++; if ($this->_itemCount >= $this->_maxItems) { @@ -83,7 +83,7 @@ $this->_randomName(), $gallery->getActiveUserId()); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } $this->_itemCount++; if ($this->_itemCount >= $this->_maxItems) { @@ -96,7 +96,7 @@ $this->_imagePath, $this->_randomName()); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } $this->_itemCount++; if ($this->_itemCount >= $this->_maxItems) { @@ -110,12 +110,12 @@ $thumbnail[$i] = new ImageContainer(); $ret = $thumbnail[$i]->createDerivative($photo[$i]->getId()); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } $ret = $thumbnail[$i]->deriveFrom($image[$i]->getId(), "scale 200"); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } /* Set the image as the photo's thumbnail */ @@ -133,14 +133,14 @@ $resize[$i][$j] = new ImageContainer(); $ret = $resize[$i][$j]->createDerivative($photo[$i]->getId()); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } $scale = rand(300, 600); $ret = $resize[$i][$j]->deriveFrom($image[$i]->getId(), "scale $scale"); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } /* Add this image to the photo's resize id list */ @@ -157,7 +157,7 @@ /* Commit the cache */ $ret = $gallery->commitCache(); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } /* Create 0-2 sub-albums */ @@ -166,7 +166,7 @@ for ($i = 0; $i < $rand3; $i++) { $ret = $this->_createRandomAlbum($album->getId()); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } } Index: CreateRandomTreeTiming.class =================================================================== RCS file: /cvsroot/gallery/gallery2/include/test/TestCase/CreateRandomTreeTiming.class,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- CreateRandomTreeTiming.class 22 May 2002 09:47:33 -0000 1.1 +++ CreateRandomTreeTiming.class 24 May 2002 07:50:21 -0000 1.2 @@ -29,7 +29,7 @@ $this->stopTiming(); $this->timingReport(); - return $ret; + return $ret->wrap(__FILE__, __LINE__); } } Index: CreateSchema.class =================================================================== RCS file: /cvsroot/gallery/gallery2/include/test/TestCase/CreateSchema.class,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- CreateSchema.class 22 May 2002 08:30:12 -0000 1.2 +++ CreateSchema.class 24 May 2002 07:50:21 -0000 1.3 @@ -17,12 +17,12 @@ list($ret, $storage) = $gallery->getStorage(); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } $ret = $storage->createSchema(); - return $ret; + return $ret->wrap(__FILE__, __LINE__); } } Index: DeleteAllItems.class =================================================================== RCS file: /cvsroot/gallery/gallery2/include/test/TestCase/DeleteAllItems.class,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- DeleteAllItems.class 24 May 2002 07:06:50 -0000 1.5 +++ DeleteAllItems.class 24 May 2002 07:50:21 -0000 1.6 @@ -13,7 +13,7 @@ $ret = $gallery->lockWorld(); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } while (true) { @@ -29,7 +29,7 @@ 'GalleryNucleus::id', SEARCH_DIRECTION_DOWN))); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } if (empty($results)) { @@ -40,19 +40,19 @@ print "<H2> Delete Item $id </H2>\n"; $ret = $gallery->deleteNucleusById($id); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } /* Commit the cache */ $ret = $gallery->commitCache(); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } } $ret = $gallery->unlock(); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } return GalleryStatus::success(); Index: DropDatabase.class =================================================================== RCS file: /cvsroot/gallery/gallery2/include/test/TestCase/DropDatabase.class,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- DropDatabase.class 22 May 2002 08:30:12 -0000 1.4 +++ DropDatabase.class 24 May 2002 07:50:21 -0000 1.5 @@ -17,7 +17,7 @@ list($ret, $storage) = $gallery->getStorage(); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } return $storage->dropDatabase(); Index: EmptyGallery.class =================================================================== RCS file: /cvsroot/gallery/gallery2/include/test/TestCase/EmptyGallery.class,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- EmptyGallery.class 22 May 2002 08:30:12 -0000 1.3 +++ EmptyGallery.class 24 May 2002 07:50:21 -0000 1.4 @@ -15,7 +15,7 @@ list($ret, $platform) = $gallery->getPlatform(); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } foreach (array($gallery->getConfig('core.directory.albums'), Index: LoadAlbumItemTiming.class =================================================================== RCS file: /cvsroot/gallery/gallery2/include/test/TestCase/LoadAlbumItemTiming.class,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- LoadAlbumItemTiming.class 20 May 2002 07:56:47 -0000 1.5 +++ LoadAlbumItemTiming.class 24 May 2002 07:50:21 -0000 1.6 @@ -23,7 +23,7 @@ list ($ret, $nucleus) = $gallery->loadNucleusByIdNoCache($this->_id); if ($ret->isError()) { $this->error($ret); - return $ret; + return $ret->wrap(__FILE__, __LINE__); } } Index: LockWorld.class =================================================================== RCS file: /cvsroot/gallery/gallery2/include/test/TestCase/LockWorld.class,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- LockWorld.class 22 May 2002 08:30:12 -0000 1.3 +++ LockWorld.class 24 May 2002 07:50:21 -0000 1.4 @@ -10,12 +10,12 @@ global $gallery; $ret = $gallery->lockWorld(); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } $ret = $gallery->unlock(); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } return GalleryStatus::success(); Index: ModifyAlbumItem.class =================================================================== RCS file: /cvsroot/gallery/gallery2/include/test/TestCase/ModifyAlbumItem.class,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- ModifyAlbumItem.class 22 May 2002 08:30:12 -0000 1.10 +++ ModifyAlbumItem.class 24 May 2002 07:50:21 -0000 1.11 @@ -14,35 +14,35 @@ $ret = $gallery->lockWorld(); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } print("Loading album item\n"); list ($ret, $album) = $gallery->loadNucleusById($this->_id); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } $album->setRows($album->getRows() + 1); $ret = $album->rename("I_have_" . $album->getRows() . "_rows"); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } $ret = $album->save(); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } $ret = $gallery->commitCache(); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } /* Leggo of our locks */ $ret = $gallery->unlock(); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } return GalleryStatus::success(); Index: ModifyAlbumItemTiming.class =================================================================== RCS file: /cvsroot/gallery/gallery2/include/test/TestCase/ModifyAlbumItemTiming.class,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- ModifyAlbumItemTiming.class 22 May 2002 08:30:12 -0000 1.9 +++ ModifyAlbumItemTiming.class 24 May 2002 07:50:21 -0000 1.10 @@ -16,14 +16,14 @@ /* Lock the world */ $ret = $gallery->lockWorld(); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } /* Load our item */ print("Loading album item\n"); list ($ret, $album) = $gallery->loadNucleusById($this->_id); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } $this->startTiming($this->_iter); @@ -36,12 +36,12 @@ $album->setRows($album->getRows() + 1); $ret = $album->save(); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } $ret = $gallery->commitCache(); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } } @@ -50,7 +50,7 @@ /* Leggo of our locks */ $ret = $gallery->unlock(); if ($ret->isError()) { - return $ret; + return $ret->wrap(__FILE__, __LINE__); } $this->stopTiming(); |