| 1 | <?php |
||
| 8 | class CouldNotDownloadCertificate extends Exception |
||
| 9 | { |
||
| 10 | use TrackDomainTrait; |
||
| 11 | |||
| 12 | public static function hostDoesNotExist(string $hostName): self |
||
| 19 | |||
| 20 | public static function noCertificateInstalled(string $hostName): self |
||
| 27 | |||
| 28 | public static function failedHandshake(Url $url): self |
||
| 29 | { |
||
| 30 | if ($url->getPort() === '80') { |
||
| 31 | return new static('Server does not support SSL over port 80.'); |
||
| 32 | } |
||
| 33 | $exception = new static("Server SSL handshake error – the certificate for `{$url->getTestURL()}` will not work."); |
||
| 34 | $exception->setErrorDomain($url->getHostName()); |
||
| 35 | |||
| 36 | return $exception; |
||
| 37 | } |
||
| 38 | |||
| 39 | 1 | public static function connectionTimeout(string $hostName): self |
|
| 46 | |||
| 47 | public static function unknownError(string $hostName, string $errorMessage): self |
||
| 54 | } |
||
| 55 |