This commit is contained in:
2021-02-22 19:22:33 +08:00
parent 014d48756f
commit b707d3359e
2 changed files with 5 additions and 1 deletions
+3
View File
@@ -128,6 +128,9 @@ class Container extends BaseObject
private function resolve($class, $constrict, $config): object private function resolve($class, $constrict, $config): object
{ {
[$reflect, $dependencies] = $this->resolveDependencies($class); [$reflect, $dependencies] = $this->resolveDependencies($class);
if (empty($reflect)) {
throw new \Exception('asdjakkjgsg');
}
foreach ($constrict as $index => $param) { foreach ($constrict as $index => $param) {
$dependencies[$index] = $param; $dependencies[$index] = $param;
} }
+2 -1
View File
@@ -11,6 +11,7 @@ namespace Snowflake\Exception;
use JetBrains\PhpStorm\Pure;
use Throwable; use Throwable;
/** /**
@@ -26,7 +27,7 @@ class NotFindClassException extends \Exception
* @param int $code * @param int $code
* @param Throwable|null $previous * @param Throwable|null $previous
*/ */
public function __construct(string $message = "", int $code = 0, Throwable $previous = null) #[Pure] public function __construct(string $message = "", int $code = 0, Throwable $previous = null)
{ {
$message = "No class named `$message` was found, please check if the class name is correct"; $message = "No class named `$message` was found, please check if the class name is correct";
parent::__construct($message, 404, $previous); parent::__construct($message, 404, $previous);