diff --git a/src/Barcode.php b/src/Barcode.php index 5b66a5e..3da1406 100644 --- a/src/Barcode.php +++ b/src/Barcode.php @@ -301,9 +301,8 @@ public static function makeRenderer($renderer = 'image', $rendererConfig = array } $rendererName = self::getPluginLoader(self::RENDERER)->load($renderer); - if (!class_exists($rendererName)) { - throw new Exception\InvalidArgumentException(sprintf( + throw new InvalidArgumentException(sprintf( 'Invalid renderer "%s"; does not resolve to a valid class', $renderer )); } diff --git a/src/Object/AbstractObject.php b/src/Object/AbstractObject.php index 3f5dae4..388a7f9 100644 --- a/src/Object/AbstractObject.php +++ b/src/Object/AbstractObject.php @@ -31,7 +31,8 @@ Zend\Barcode\Object\Exception\RuntimeException, Zend\Barcode\Object\Exception\InvalidArgumentException, Zend\Barcode\Object\Exception\BarcodeValidationException, - Zend\Barcode\Object\Exception\OutOfRangeException; + Zend\Barcode\Object\Exception\OutOfRangeException, + Zend\Barcode\Object\Exception\ExtensionNotLoadedException; /** * Class for generate Barcode diff --git a/test/FactoryTest.php b/test/FactoryTest.php index b0d6283..65de3f9 100644 --- a/test/FactoryTest.php +++ b/test/FactoryTest.php @@ -320,7 +320,7 @@ public function testBarcodeFactoryWithNamespaceButWithoutExtendingRendererAbstra public function testBarcodeRendererFactoryWithUnexistantRenderer() { - $this->setExpectedException('\Zend\Loader\Exception\PluginLoaderException'); + $this->setExpectedException('\Zend\Barcode\Exception\InvalidArgumentException'); $renderer = Barcode\Barcode::makeRenderer('zend', array()); }