| 1 |
<?php |
| 2 |
|
| 3 |
namespace AATXT\App\Domain\Exceptions; |
| 4 |
|
| 5 |
use Exception; |
| 6 |
|
| 7 |
/** |
| 8 |
* Exception thrown when an AI provider returns an empty response. |
| 9 |
* |
| 10 |
* This exception indicates that the AI provider successfully responded |
| 11 |
* but returned an empty or invalid alt text. |
| 12 |
*/ |
| 13 |
class EmptyResponseException extends Exception |
| 14 |
{ |
| 15 |
/** |
| 16 |
* Constructor |
| 17 |
* |
| 18 |
* @param string $provider The provider name that returned empty response |
| 19 |
*/ |
| 20 |
public function __construct(string $provider = 'AI Provider') |
| 21 |
{ |
| 22 |
parent::__construct( |
| 23 |
sprintf('%s returned an empty response. Unable to generate alt text.', $provider) |
| 24 |
); |
| 25 |
} |
| 26 |
} |
| 27 |
|