Database/src/Exceptions/UnknownDatabaseException.php

21 lines
589 B
PHP

<?php
namespace Nest\Database\Exceptions;
use Throwable;
/**
* Exception thrown when a requested database is unknown.
*/
class UnknownDatabaseException extends DatabaseException
{
/**
* @param string $identifier Database identifier.
* @param int $code [optional] The Exception code.
* @param null|Throwable $previous [optional] The previous throwable used for the exception chaining.
*/
public function __construct(public string $identifier, int $code = 0, ?Throwable $previous = null)
{
parent::__construct("Unknown database $this->identifier.", $code, $previous);
}
}