Database/src/Exceptions/UnknownDatabaseException.php

22 lines
589 B
PHP
Raw Normal View History

2024-11-08 16:33:44 +01:00
<?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);
}
}