Files
dreamstudio/app/Exceptions/BudgetExceededException.php
root 79320950e7 Initial commit: Runware-powered content generator foundation
Laravel app with a cost-tracked Runware.ai integration (image, video,
text generation), a hard monthly EUR budget cap with live USD/EUR FX
conversion, and a locally-maintained model/pricing table since
Runware's model-search API doesn't expose pricing.
2026-09-23 15:59:05 +03:00

22 lines
514 B
PHP

<?php
namespace App\Exceptions;
use RuntimeException;
class BudgetExceededException extends RuntimeException
{
public function __construct(
public readonly float $spentEur,
public readonly float $capEur,
public readonly float $estimatedEur,
) {
parent::__construct(sprintf(
'Runware monthly budget would be exceeded: %.2f€ spent + %.2f€ estimated > %.2f€ cap.',
$spentEur,
$estimatedEur,
$capEur,
));
}
}