web/lib/Exceptions/InvalidCollectionTypeException.php
2024-11-08 16:34:21 -06:00

15 lines
438 B
PHP

<?
namespace Exceptions;
class InvalidCollectionTypeException extends AppException{
/** @var string $message */
protected $message = 'Collection type should be `series` or `set` according to the EPUB specification.';
public function __construct(?\Enums\CollectionType $collectionType){
if($collectionType !== null){
$this->message .= ' Type provided: ' . $collectionType->value;
}
parent::__construct($this->message);
}
}