show PEAR_Error message, not the object

This commit is contained in:
Evan Prodromou 2010-04-07 10:43:14 -04:00
parent dbaa93d1aa
commit 82326a3b69
1 changed files with 3 additions and 0 deletions

View File

@ -505,6 +505,9 @@ class Memcached_DataObject extends Safe_DataObject
if ($this->id) {
$id .= ':' . $this->id;
}
if ($message instanceof PEAR_Error) {
$message = $message->getMessage();
}
throw new ServerException("[$id] DB_DataObject error [$type]: $message");
}