merged branch khepin/better_error_message (PR #4179)
Commits
-------
43dc19e
update exception message so user can know which message has caused the exception
Discussion
----------
[Translation] Improved error message
Bug fix: [no]
Feature addition: [no]
Backwards compatibility break: [no]
Symfony2 tests pass: [no] - (no more or less than they were passing before this addition)
Updates an error message in the translator so the developers can know what is the message causing the error.
---------------------------------------------------------------------------
by stof at 2012-05-02T12:09:20Z
You should keep it on one line
---------------------------------------------------------------------------
by khepin at 2012-05-02T14:05:08Z
done
This commit is contained in:
commit
ba22e5b8f2
@ -74,7 +74,7 @@ class MessageSelector
|
||||
|
||||
$position = PluralizationRules::get($number, $locale);
|
||||
if (!isset($standardRules[$position])) {
|
||||
throw new \InvalidArgumentException('Unable to choose a translation.');
|
||||
throw new \InvalidArgumentException(sprintf('Unable to choose a translation for "%s" with locale "%s".', $message, $locale));
|
||||
}
|
||||
|
||||
return $standardRules[$position];
|
||||
|
Reference in New Issue
Block a user