Replace RuntimeException with DownloaderException for Go version retrieval failure

This commit is contained in:
crazywhalecc
2026-02-28 14:02:32 +08:00
parent 40e36982d3
commit 550f6cad60

View File

@@ -77,7 +77,7 @@ class go_xcaddy
{
[$version] = explode("\n", default_shell()->executeCurl('https://go.dev/VERSION?m=text') ?: '');
if ($version === '') {
throw new \RuntimeException('Failed to get latest Go version from https://go.dev/VERSION?m=text');
throw new DownloaderException('Failed to get latest Go version from https://go.dev/VERSION?m=text');
}
return new CheckUpdateResult(
old: $old_version,