Repository: spiral/framework (php)

Issue:
BootloadManager doesn't show error message when bootloader class not found

Pull request description:
Add error message for not exist Bootloader class
fixed #568

| Q             | A
| ------------- | ---
| Bugfix?       | ✔️
| Breaks BC?    | ❌
| New feature?  | ❌
| Issues        | #568 

Patch:
diff --git a/src/Boot/src/BootloadManager.php b/src/Boot/src/BootloadManager.php
index 31be8fca0..a341d1d5b 100644
--- a/src/Boot/src/BootloadManager.php
+++ b/src/Boot/src/BootloadManager.php
@@ -14,6 +14,7 @@ namespace Spiral\Boot;
 use Closure;
 use Spiral\Boot\Bootloader\BootloaderInterface;
 use Spiral\Boot\Bootloader\DependedInterface;
+use Spiral\Boot\Exception\ClassNotFoundException;
 use Spiral\Core\Container;
 
 /**
@@ -106,7 +107,9 @@ final class BootloadManager implements Container\SingletonInterface
             try {
                 $class = (new \ReflectionClass($class))->getName();
             } catch (\ReflectionException $e) {
-                throw new \Spiral\Boot\Exception\ClassNotFoundException();
+                throw new ClassNotFoundException(
+                    \sprintf('Bootloader class `%s` is not exist.', $class)
+                );
             }
 
             if (\in_array($class, $this->classes, true)) {


Test patch:
diff --git a/src/Boot/tests/BootloadersTest.php b/src/Boot/tests/BootloadersTest.php
index 0f590fe0a..d7f637bac 100644
--- a/src/Boot/tests/BootloadersTest.php
+++ b/src/Boot/tests/BootloadersTest.php
@@ -59,10 +59,11 @@ class BootloadersTest extends TestCase
     public function testException(): void
     {
         $this->expectException(\Spiral\Boot\Exception\ClassNotFoundException::class);
+        $this->expectErrorMessage('Bootloader class `Foo\Bar\Invalid` is not exist.');
 
         $container = new Container();
 
         $bootloader = new BootloadManager($container);
-        $bootloader->bootload(['Invalid']);
+        $bootloader->bootload(['Foo\Bar\Invalid']);
     }
 }