From: Evan Prodromou Date: Wed, 16 Nov 2011 17:00:13 +0000 (-0500) Subject: Merge branch '1.0.x' into 1.1.x X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=f519858044a627e99244b334b7bef3f7f96fa317;p=quix0rs-gnu-social.git Merge branch '1.0.x' into 1.1.x Conflicts: lib/framework.php --- f519858044a627e99244b334b7bef3f7f96fa317 diff --cc lib/framework.php index 05a8b7abda,4458313eb9..69c1e4f6c8 --- a/lib/framework.php +++ b/lib/framework.php @@@ -151,10 -152,19 +151,18 @@@ function PEAR_ErrorToPEAR_Exception($er if ($err->getCode() == DB_DATAOBJECT_ERROR_NODATA) { return; } + + $msg = $err->getMessage(); + $userInfo = $err->getUserInfo(); + + // Log this; push the message up as an exception + + common_log(LOG_ERR, "PEAR Error: $msg ($userInfo)"); + if ($err->getCode()) { - throw new PEAR_Exception($msg, $err, $err->getCode()); - } else { - throw new PEAR_Exception($msg, $err); + throw new PEAR_Exception($err->getMessage(), $err->getCode()); } + throw new PEAR_Exception($err->getMessage()); } PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, 'PEAR_ErrorToPEAR_Exception');