From bcd8db2a344f279ce80700901249aa858c0de79e Mon Sep 17 00:00:00 2001 From: Romain Neutron Date: Thu, 30 Aug 2012 21:32:42 +0200 Subject: [PATCH] [DependencyInjection] Normalize exceptions --- .../Component/DependencyInjection/Loader/XmlFileLoader.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php b/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php index 5329195cdb..e32e787dd1 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php +++ b/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php @@ -11,13 +11,13 @@ namespace Symfony\Component\DependencyInjection\Loader; +use Symfony\Component\Config\Resource\FileResource; use Symfony\Component\DependencyInjection\DefinitionDecorator; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\DependencyInjection\Alias; use Symfony\Component\DependencyInjection\Definition; use Symfony\Component\DependencyInjection\Reference; use Symfony\Component\DependencyInjection\SimpleXMLElement; -use Symfony\Component\Config\Resource\FileResource; use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; use Symfony\Component\DependencyInjection\Exception\RuntimeException; @@ -213,7 +213,7 @@ class XmlFileLoader extends FileLoader if (!$dom->loadXML(file_get_contents($file), LIBXML_NONET | (defined('LIBXML_COMPACT') ? LIBXML_COMPACT : 0))) { libxml_disable_entity_loader($disableEntities); - throw new \InvalidArgumentException(implode("\n", $this->getXmlErrors($internalErrors))); + throw new InvalidArgumentException(implode("\n", $this->getXmlErrors($internalErrors))); } $dom->normalizeDocument(); @@ -222,7 +222,7 @@ class XmlFileLoader extends FileLoader foreach ($dom->childNodes as $child) { if ($child->nodeType === XML_DOCUMENT_TYPE_NODE) { - throw new \InvalidArgumentException('Document types are not allowed.'); + throw new InvalidArgumentException('Document types are not allowed.'); } }