koel/app/Exceptions/FailedToParsePodcastFeedException.php

20 lines
454 B
PHP
Raw Normal View History

2024-05-19 05:49:42 +00:00
<?php
namespace App\Exceptions;
use Exception;
use Throwable;
final class FailedToParsePodcastFeedException extends Exception
{
private function __construct(string $url, Throwable $previous)
{
parent::__construct("Failed to parse the podcast feed at $url.", (int) $previous->getCode(), $previous);
}
public static function create(string $url, Throwable $previous): self
{
return new self($url, $previous);
}
}