minor #11767 Improve the exception message of UrlMatcher (dawehner)

This PR was merged into the 2.6-dev branch.

Discussion
----------

Improve the exception message of UrlMatcher

The current exception message is not optimal, some more context always helps.

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| License       | MIT

Commits
-------

ee1197d Improve the exception message in the UrlMatcher.
This commit is contained in:
Fabien Potencier 2014-08-27 10:35:34 +02:00
commit 9182904f6f

View File

@ -93,7 +93,7 @@ class UrlMatcher implements UrlMatcherInterface, RequestMatcherInterface
throw 0 < count($this->allow) throw 0 < count($this->allow)
? new MethodNotAllowedException(array_unique(array_map('strtoupper', $this->allow))) ? new MethodNotAllowedException(array_unique(array_map('strtoupper', $this->allow)))
: new ResourceNotFoundException(); : new ResourceNotFoundException(sprintf('No routes found for %s.', $pathinfo));
} }
/** /**