From: Michael J. Rubinsky Date: Fri, 19 Feb 2010 17:04:42 +0000 (-0500) Subject: Catch and log errors X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=187aa28931356d5b1b9789b5ae038fc0bd13bce7;p=horde.git Catch and log errors --- diff --git a/ansel/lib/Image.php b/ansel/lib/Image.php index a34fddc7a..6944c8044 100644 --- a/ansel/lib/Image.php +++ b/ansel/lib/Image.php @@ -409,6 +409,9 @@ class Ansel_Image Implements Iterator if ($view == 'prettythumb') { // If we still fail, the exception gets thrown up the chain. $iview = Ansel_ImageView::factory('Thumb', array('image' => $this, 'style' => 'ansel_default')); + } else { + // If it wasn't a prettythumb, then something else must be wrong + throw $e; } } @@ -1086,6 +1089,7 @@ class Ansel_Image Implements Iterator try { $this->_image->addEffect($type, $params); } catch (Horde_Image_Exception $e) { + Horde::logMessage($e->getMessage(), __FILE__, __LINE__, PEAR_LOG_DEBUG); throw new Ansel_Exception($e); } } diff --git a/ansel/lib/ImageView/ShadowSharpThumb.php b/ansel/lib/ImageView/ShadowSharpThumb.php index ffc994e9a..8929f411d 100644 --- a/ansel/lib/ImageView/ShadowSharpThumb.php +++ b/ansel/lib/ImageView/ShadowSharpThumb.php @@ -30,11 +30,11 @@ class Ansel_ImageView_ShadowSharpThumb extends Ansel_ImageView } try { - $this->_image->addEffect('border', array('bordercolor' => '#333')); + $this->_image->addEffect('Border', array('bordercolor' => '#333', 'borderwidth' => 1)); $this->_image->addEffect('DropShadow', array('background' => $styleDef['background'], 'padding' => 5, - 'distance' => '8', + 'distance' => 8, 'fade' => 2)); $this->_image->applyEffects(); } catch (Horde_Image_Exception $e) {