update exception message so user can know which message has caused the exception

This commit is contained in:
Sebastien Armand 2012-05-02 18:19:19 +08:00
parent 8eea5c3d5f
commit 43dc19e00a

View File

@ -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];