| 1 |
<?php |
| 2 |
|
| 3 |
namespace AATXT\App\Domain\Exceptions; |
| 4 |
|
| 5 |
use Exception; |
| 6 |
|
| 7 |
/** |
| 8 |
* Exception thrown when trying to create a generator for an unsupported type. |
| 9 |
* |
| 10 |
* This exception is thrown by the AltTextGeneratorFactory when a generator |
| 11 |
* type is requested that hasn't been registered in the factory. |
| 12 |
*/ |
| 13 |
class UnsupportedGeneratorException extends Exception |
| 14 |
{ |
| 15 |
/** |
| 16 |
* Constructor |
| 17 |
* |
| 18 |
* @param string $type The unsupported generator type |
| 19 |
*/ |
| 20 |
public function __construct(string $type) |
| 21 |
{ |
| 22 |
parent::__construct( |
| 23 |
sprintf('Unsupported generator type: "%s". Please register this generator type in the factory.', $type) |
| 24 |
); |
| 25 |
} |
| 26 |
} |
| 27 |
|