]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Add class and (if present) id to DB_DataObject error exceptions; often they're VERRRR...
authorBrion Vibber <brion@pobox.com>
Wed, 24 Feb 2010 01:09:12 +0000 (01:09 +0000)
committerBrion Vibber <brion@pobox.com>
Wed, 24 Feb 2010 01:09:12 +0000 (01:09 +0000)
classes/Memcached_DataObject.php

index 40576dc71783aedda343e8ea25414b11f777e70e..bc4c3a000ce11a732bc495e878fc018854dcd79d 100644 (file)
@@ -501,7 +501,11 @@ class Memcached_DataObject extends Safe_DataObject
 
     function raiseError($message, $type = null, $behaviour = null)
     {
-        throw new ServerException("DB_DataObject error [$type]: $message");
+        $id = get_class($this);
+        if ($this->id) {
+            $id .= ':' . $this->id;
+        }
+        throw new ServerException("[$id] DB_DataObject error [$type]: $message");
     }
 
     static function cacheGet($keyPart)