Final Class Yiisoft\Definitions\Exception\NotInstantiableClassException
| Inheritance | Yiisoft\ |
|---|---|
| Implements | Psr\ |
NotInstantiableClassException is thrown when a class can not be instantiated for whatever reason.
Public Methods
| Method | Description | Defined By |
|---|---|---|
| __construct() | Yiisoft\ |
Method Details
| public mixed __construct ( string $class, ?string $message = null, integer $code = 0, ?\ | ||
| $class | string | |
| $message | ?string | |
| $code | integer | |
| $previous | ?\ |
|
public function __construct(string $class, ?string $message = null, int $code = 0, ?Exception $previous = null)
{
if ($message === null) {
$message = "Can not instantiate $class.";
}
parent::__construct($message, $code, $previous);
}
User Contributed Notes
Leave a comment
Join the conversation to share a note.