Skip to content

Commit

Permalink
minor #14081 [Config][DX] improve file loader error message for missi…
Browse files Browse the repository at this point in the history
…ng resource (cordoval)

This PR was merged into the 2.3 branch.

Discussion
----------

[Config][DX] improve file loader error message for missing resource

|Q            |A     |
|---          |---   |
|Bug Fix?     |y     |
|New Feature? |n     |
|BC Breaks?   |n     |
|Deprecations?|n     |
|Tests Pass?  |y     |
|Fixed Tickets|#11958|
|License      |MIT   |
|Doc PR       |      |

Commits
-------

a2deb61 [DX] improve file loader error for router/other resources in bundle
  • Loading branch information
fabpot committed Apr 18, 2015
2 parents 8b22526 + a2deb61 commit 9c6f65f
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -36,7 +36,8 @@ public function __construct($resource, $sourceResource = null, $code = null, $pr
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());
Expand Down

0 comments on commit 9c6f65f

Please sign in to comment.