Skip to content

Commit 0abff1f

Browse files
committed
[Translation] added Base Exception for the component.
1 parent 0423dd1 commit 0abff1f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Translation/Translator.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
use Symfony\Component\Translation\Translator as BaseTranslator;
1616
use Symfony\Component\Translation\MessageSelector;
1717
use Symfony\Component\DependencyInjection\ContainerInterface;
18+
use Symfony\Component\Translation\Exception\InvalidArgumentException;
1819

1920
/**
2021
* Translator.
@@ -51,7 +52,7 @@ class Translator extends BaseTranslator implements WarmableInterface
5152
* @param array $loaderIds An array of loader Ids
5253
* @param array $options An array of options
5354
*
54-
* @throws \InvalidArgumentException
55+
* @throws InvalidArgumentException
5556
*/
5657
public function __construct(ContainerInterface $container, MessageSelector $selector, $loaderIds = array(), array $options = array())
5758
{
@@ -60,7 +61,7 @@ public function __construct(ContainerInterface $container, MessageSelector $sele
6061

6162
// check option names
6263
if ($diff = array_diff(array_keys($options), array_keys($this->options))) {
63-
throw new \InvalidArgumentException(sprintf('The Translator does not support the following options: \'%s\'.', implode('\', \'', $diff)));
64+
throw new InvalidArgumentException(sprintf('The Translator does not support the following options: \'%s\'.', implode('\', \'', $diff)));
6465
}
6566

6667
$this->options = array_merge($this->options, $options);

0 commit comments

Comments
 (0)