|
11 | 11 |
|
12 | 12 | namespace Symfony\Bundle\MonologBundle\DependencyInjection;
|
13 | 13 |
|
14 |
| -use InvalidArgumentException; |
15 | 14 | use Monolog\Logger;
|
16 | 15 | use Monolog\Processor\ProcessorInterface;
|
17 | 16 | use Monolog\ResettableInterface;
|
@@ -859,7 +858,7 @@ private function buildHandler(ContainerBuilder $container, $name, array $handler
|
859 | 858 | $nullWarning = ', if you meant to define a null handler in a yaml config, make sure you quote "null" so it does not get converted to a php null';
|
860 | 859 | }
|
861 | 860 |
|
862 |
| - throw new InvalidArgumentException(sprintf('Invalid handler type "%s" given for handler "%s"' . $nullWarning, $handler['type'], $name)); |
| 861 | + throw new \InvalidArgumentException(sprintf('Invalid handler type "%s" given for handler "%s"' . $nullWarning, $handler['type'], $name)); |
863 | 862 | }
|
864 | 863 |
|
865 | 864 | if (!empty($handler['nested']) && true === $handler['nested']) {
|
@@ -967,20 +966,14 @@ private function getHandlerClassByType($handlerType)
|
967 | 966 |
|
968 | 967 | if (!isset($typeToClassMapping[$handlerType])) {
|
969 | 968 | if (Logger::API === 1 && array_key_exists($handlerType, $v2HandlerTypesAdded)) {
|
970 |
| - throw new InvalidArgumentException( |
971 |
| - sprintf('"%s" was added in MonoLog v2, please upgrade if you wish to use.', $handlerType) |
972 |
| - ); |
| 969 | + throw new \InvalidArgumentException(sprintf('"%s" was added in Monolog v2, please upgrade if you wish to use it.', $handlerType)); |
973 | 970 | }
|
974 | 971 |
|
975 | 972 | if (Logger::API === 2 && array_key_exists($handlerType, $v2HandlerTypesRemoved)) {
|
976 |
| - throw new InvalidArgumentException( |
977 |
| - sprintf('"%s" was removed in MonoLog v2.', $handlerType) |
978 |
| - ); |
| 973 | + throw new \InvalidArgumentException(sprintf('"%s" was removed in Monolog v2.', $handlerType)); |
979 | 974 | }
|
980 | 975 |
|
981 |
| - throw new InvalidArgumentException( |
982 |
| - sprintf('There is no handler class defined for handler "%s".', $handlerType) |
983 |
| - ); |
| 976 | + throw new \InvalidArgumentException(sprintf('There is no handler class defined for handler "%s".', $handlerType)); |
984 | 977 | }
|
985 | 978 |
|
986 | 979 | return $typeToClassMapping[$handlerType];
|
|
0 commit comments