| 1: | <?php |
| 2: | |
| 3: | declare(strict_types=1); |
| 4: | |
| 5: | |
| 6: | |
| 7: | |
| 8: | |
| 9: | |
| 10: | |
| 11: | |
| 12: | |
| 13: | |
| 14: | namespace Nexus\Mcp\Extension\Tasks\Client\Exception; |
| 15: | |
| 16: | use Nexus\Mcp\Core\Exception\McpExceptionInterface; |
| 17: | use Nexus\Mcp\Core\SafeDisplay; |
| 18: | |
| 19: | |
| 20: | |
| 21: | |
| 22: | final class StalledTaskException extends \RuntimeException implements McpExceptionInterface |
| 23: | { |
| 24: | |
| 25: | |
| 26: | |
| 27: | public function __construct(string $taskId, int $polls) |
| 28: | { |
| 29: | parent::__construct(\sprintf( |
| 30: | 'Task "%s" stayed input_required for %d polls without new input requests.', |
| 31: | SafeDisplay::sanitise($taskId), |
| 32: | $polls, |
| 33: | )); |
| 34: | } |
| 35: | } |
| 36: | |