Skip to content

Commit dd201d1

Browse files
committed
replace Exception for Throwable
1 parent 701e0e7 commit dd201d1

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/core/Loader.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
namespace flight\core;
66

7-
use Exception;
7+
use Throwable;
88

99
/**
1010
* The Loader class is responsible for loading objects. It maintains a list of
@@ -52,7 +52,7 @@ public function unregister(string $name): void
5252
* Loads a registered class.
5353
* @param string $name Method name
5454
* @param bool $shared Shared instance
55-
* @throws Exception
55+
* @throws Throwable
5656
* @return ?object Class instance
5757
*/
5858
public function load(string $name, bool $shared = true): ?object
@@ -98,7 +98,7 @@ public function getInstance(string $name): ?object
9898
* @template T of object
9999
* @param class-string<T>|callable(): T $class Class name or callback function to instantiate class
100100
* @param array<int, string> $params Class initialization parameters
101-
* @throws Exception
101+
* @throws Throwable
102102
* @return T Class instance
103103
*/
104104
public function newInstance($class, array $params = []): object

0 commit comments

Comments
 (0)