Skip to content

Commit

Permalink
[HttpKernel] Added some details for two commonly encountered errors i…
Browse files Browse the repository at this point in the history
…n Kernel.php and HttpKernel.php

I used https://github.com/fabpot/symfony/blob/master/src/Symfony/Component/Form/PropertyPath.php#L324 as a model for the wording
  • Loading branch information
Fabrice Bernhard authored and fabpot committed Feb 14, 2011
1 parent 9a89b46 commit 20e31cd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Symfony/Component/HttpKernel/HttpKernel.php
Expand Up @@ -89,7 +89,7 @@ protected function handleRaw(Request $request, $type = self::MASTER_REQUEST)

// load controller
if (false === $controller = $this->resolver->getController($request)) {
throw new NotFoundHttpException(sprintf('Unable to find the controller for "%s", check your route configuration.', $request->getPathInfo()));
throw new NotFoundHttpException(sprintf('Unable to find the controller for path "%s". Maybe you forgot to add the matching route in your routing configuration?', $request->getPathInfo()))
}

$event = new Event($this, 'core.controller', array('request_type' => $type, 'request' => $request));
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/HttpKernel/Kernel.php
Expand Up @@ -186,7 +186,7 @@ public function isClassInActiveBundle($class)
public function getBundle($name, $first = true)
{
if (!isset($this->bundleMap[$name])) {
throw new \InvalidArgumentException(sprintf('Bundle "%s" does not exist or it is not enabled.', $name));
throw new \InvalidArgumentException(sprintf('Bundle "%s" does not exist or it is not enabled. Maybe you forgot to add it in the registerBundles() function of your %s.php file?', $name, get_class($this)));
}

if (true === $first) {
Expand Down

0 comments on commit 20e31cd

Please sign in to comment.