diff --git a/CHANGELOG.md b/CHANGELOG.md index a185875..b35a71d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## 2.0.6 - 2020-01-27 +### Changed +- Let extract task throw exceptions when the extracting itself fails. + ## 2.0.5 - 2019-10-11 ### Changed - Log warnings when `ColorExtractorTask` fails, instead of throwing exceptions. diff --git a/composer.json b/composer.json index 0885ea7..6761d41 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "born05/craft-colorextractor", "description": "Extract colors from image assets in Craft CMS. Requires a field named `imageColor` on all assets of kind image (can be color or plaintext)", "type": "craft-plugin", - "version": "2.0.5", + "version": "2.0.6", "keywords": [ "craft", "cms", diff --git a/src/services/Asset.php b/src/services/Asset.php index a8cb188..8be4541 100644 --- a/src/services/Asset.php +++ b/src/services/Asset.php @@ -61,14 +61,7 @@ public function getImageColor(AssetElement $asset, bool $forceSave = false) // Only Extract color when forced. if ($forceSave && isset($asset->imageColor)) { - try { - $color = $this->extractColor($asset); - } catch (Exception $e) { - Craft::error( - $e->getMessage(), - __METHOD__ - ); - } + $color = $this->extractColor($asset); if (!empty($color)) { $asset->setFieldValue('imageColor', $color);