From a2deb618db5a99d044dbc5bd9475f18f40e0677d Mon Sep 17 00:00:00 2001 From: Luis Cordova Date: Fri, 27 Mar 2015 09:54:14 -0500 Subject: [PATCH] [DX] improve file loader error for router/other resources in bundle --- .../Component/Config/Exception/FileLoaderLoadException.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Component/Config/Exception/FileLoaderLoadException.php b/src/Symfony/Component/Config/Exception/FileLoaderLoadException.php index b2a567ecda..09956438a5 100644 --- a/src/Symfony/Component/Config/Exception/FileLoaderLoadException.php +++ b/src/Symfony/Component/Config/Exception/FileLoaderLoadException.php @@ -36,7 +36,8 @@ class FileLoaderLoadException extends \Exception if ('@' === $resource[0]) { $parts = explode(DIRECTORY_SEPARATOR, $resource); $bundle = substr($parts[0], 1); - $message .= ' '.sprintf('Make sure the "%s" bundle is correctly registered and loaded in the application kernel class.', $bundle); + $message .= sprintf(' Make sure the "%s" bundle is correctly registered and loaded in the application kernel class.', $bundle); + $message .= sprintf(' If the bundle is registered, make sure the bundle path "%s" is not empty.', $resource); } elseif ($previous) { // include the previous exception, to help the user see what might be the underlying cause $message .= ' '.sprintf('(%s)', $previous->getMessage());