2025-11-30 15:35:04 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
|
|
namespace StaticPHP\Exception;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Exception thrown when an error occurs during the downloading process.
|
|
|
|
|
*
|
|
|
|
|
* This exception is used to indicate that a download operation has failed,
|
|
|
|
|
* typically due to network issues, invalid URLs, or other related problems.
|
|
|
|
|
*/
|
2026-04-16 14:08:06 +08:00
|
|
|
class DownloaderException extends SPCException
|
|
|
|
|
{
|
|
|
|
|
public function __construct(string $message = '', int $code = 0, ?\Throwable $previous = null, private readonly ?string $artifact_name = null)
|
|
|
|
|
{
|
|
|
|
|
parent::__construct($message, $code, $previous);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function getArtifactName(): ?string
|
|
|
|
|
{
|
|
|
|
|
return $this->artifact_name;
|
|
|
|
|
}
|
|
|
|
|
}
|