forked from GNUsocial/gnu-social
Add class and (if present) id to DB_DataObject error exceptions; often they're VERRRRRY vague, and it helps to know what type of item is failing!
This commit is contained in:
parent
391b45949f
commit
2aaf8d4e30
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user