Remove redundant catch for downloader

This commit is contained in:
crazywhalecc 2026-02-15 21:57:21 +08:00 committed by Jerry Ma
parent 2fdb0b406f
commit 059f785e0d

View File

@ -14,7 +14,6 @@ use StaticPHP\Artifact\Downloader\Type\ValidatorInterface;
use StaticPHP\DI\ApplicationContext; use StaticPHP\DI\ApplicationContext;
use StaticPHP\Exception\DownloaderException; use StaticPHP\Exception\DownloaderException;
use StaticPHP\Exception\ExecutionException; use StaticPHP\Exception\ExecutionException;
use StaticPHP\Exception\SPCException;
use StaticPHP\Exception\ValidationException; use StaticPHP\Exception\ValidationException;
use StaticPHP\Exception\WrongUsageException; use StaticPHP\Exception\WrongUsageException;
use StaticPHP\Registry\ArtifactLoader; use StaticPHP\Registry\ArtifactLoader;
@ -316,9 +315,6 @@ class ArtifactDownloader
InteractiveTerm::success("Downloaded all {$count} artifacts.{$skip_msg}\n", true); InteractiveTerm::success("Downloaded all {$count} artifacts.{$skip_msg}\n", true);
} }
} }
} catch (SPCException $e) {
array_map(fn ($x) => InteractiveTerm::error($x), explode("\n", $e->getMessage()));
throw new WrongUsageException();
} finally { } finally {
if ($interactive) { if ($interactive) {
Shell::passthruCallback(null); Shell::passthruCallback(null);