diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index a159de01fc2..40e1ee49c28 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -13,7 +13,7 @@ This serves two purposes: - for new features. ### Changed -- for changes in existing functionality. +- Updated discovery exception message to include the causing exception message in https://github.com/hydephp/develop/pull/1305 ### Deprecated - for soon-to-be removed features. diff --git a/packages/framework/src/Foundation/Concerns/BaseFoundationCollection.php b/packages/framework/src/Foundation/Concerns/BaseFoundationCollection.php index 300318cc9fd..c11dbe9c431 100644 --- a/packages/framework/src/Foundation/Concerns/BaseFoundationCollection.php +++ b/packages/framework/src/Foundation/Concerns/BaseFoundationCollection.php @@ -51,7 +51,7 @@ final public function boot(): static $this->runDiscovery(); $this->runExtensionHandlers(); } catch (Throwable $exception) { - throw new RuntimeException('An error occurred during the discovery process.', previous: $exception); + throw new RuntimeException("An error occurred during the discovery process: {$exception->getMessage()}", previous: $exception); } return $this;