mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-06 00:05:42 +08:00
Enhance error handling in artifact downloading process
This commit is contained in:
@@ -10,4 +10,15 @@ namespace StaticPHP\Exception;
|
||||
* This exception is used to indicate that a download operation has failed,
|
||||
* typically due to network issues, invalid URLs, or other related problems.
|
||||
*/
|
||||
class DownloaderException extends SPCException {}
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user