File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
lib/internal/Magento/Framework/Autoload Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 5
5
*/
6
6
namespace Magento \Framework \Autoload ;
7
7
8
+ use InvalidArgumentException ;
8
9
use Magento \Framework \Autoload \AutoloaderInterface ;
9
10
10
11
/**
@@ -23,21 +24,21 @@ class AutoloaderRegistry
23
24
* @param AutoloaderInterface $newAutoloader
24
25
* @return void
25
26
*/
26
- public static function registerAutoloader (AutoloaderInterface $ newAutoloader )
27
+ public static function registerAutoloader (AutoloaderInterface $ newAutoloader ): void
27
28
{
28
29
self ::$ autoloader = $ newAutoloader ;
29
30
}
30
31
31
32
/**
32
33
* Returns the registered autoloader
33
34
*
34
- * @throws \Exception
35
+ * @throws InvalidArgumentException
35
36
* @return AutoloaderInterface
36
37
*/
37
38
public static function getAutoloader (): AutoloaderInterface
38
39
{
39
40
if (!self ::$ autoloader instanceof AutoloaderInterface) {
40
- throw new \ Exception ('Autoloader is not registered, cannot be retrieved. ' );
41
+ throw new InvalidArgumentException ('Autoloader is not registered, cannot be retrieved. ' );
41
42
}
42
43
43
44
return self ::$ autoloader ;
You can’t perform that action at this time.
0 commit comments