[DX] improve file loader error for router/other resources in bundle

This commit is contained in:
Luis Cordova 2015-03-27 09:54:14 -05:00
parent 8584bfc3d4
commit a2deb618db
1 changed files with 2 additions and 1 deletions

View File

@ -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());