From 1da63a026cca175c282fc52e3f8a090aa09ab472 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ladislav=20T=C3=A1nczos?= Date: Wed, 27 May 2015 16:15:38 +0200 Subject: [PATCH 1/3] InvalidResourceException file name Added filen ame to the InvalidResourceException, --- src/Symfony/Component/Translation/Loader/XliffFileLoader.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Translation/Loader/XliffFileLoader.php b/src/Symfony/Component/Translation/Loader/XliffFileLoader.php index 99761e7f246ca..b164c498ec2b9 100644 --- a/src/Symfony/Component/Translation/Loader/XliffFileLoader.php +++ b/src/Symfony/Component/Translation/Loader/XliffFileLoader.php @@ -148,7 +148,7 @@ private function parseFile($file) $source = str_replace('http://www.w3.org/2001/xml.xsd', $location, $source); if (!@$dom->schemaValidateSource($source)) { - throw new InvalidResourceException(implode("\n", $this->getXmlErrors($internalErrors))); + throw new InvalidResourceException("File:$file\n".implode("\n", $this->getXmlErrors($internalErrors))); } $dom->normalizeDocument(); From be7455e8eb25b6c3ff99d2ad7ef9b9b48095f8ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ladislav=20T=C3=A1nczos?= Date: Thu, 28 May 2015 07:57:05 +0200 Subject: [PATCH 2/3] Refactored parseFile exception Refactored InvalidResourceException message. --- src/Symfony/Component/Translation/Loader/XliffFileLoader.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Translation/Loader/XliffFileLoader.php b/src/Symfony/Component/Translation/Loader/XliffFileLoader.php index b164c498ec2b9..b0faf875e76ac 100644 --- a/src/Symfony/Component/Translation/Loader/XliffFileLoader.php +++ b/src/Symfony/Component/Translation/Loader/XliffFileLoader.php @@ -148,7 +148,7 @@ private function parseFile($file) $source = str_replace('http://www.w3.org/2001/xml.xsd', $location, $source); if (!@$dom->schemaValidateSource($source)) { - throw new InvalidResourceException("File:$file\n".implode("\n", $this->getXmlErrors($internalErrors))); + throw new InvalidResourceException(sprintf('The "%s" is not a valid resource: ', $file, implode("\n", $this->getXmlErrors($internalErrors)))); } $dom->normalizeDocument(); From 229daddcd215b1b16131fc6388e81fe1a232fec2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ladislav=20T=C3=A1nczos?= Date: Thu, 28 May 2015 09:00:09 +0200 Subject: [PATCH 3/3] Update XliffFileLoader.php --- src/Symfony/Component/Translation/Loader/XliffFileLoader.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Translation/Loader/XliffFileLoader.php b/src/Symfony/Component/Translation/Loader/XliffFileLoader.php index b0faf875e76ac..d2b5407f82e1f 100644 --- a/src/Symfony/Component/Translation/Loader/XliffFileLoader.php +++ b/src/Symfony/Component/Translation/Loader/XliffFileLoader.php @@ -148,7 +148,7 @@ private function parseFile($file) $source = str_replace('http://www.w3.org/2001/xml.xsd', $location, $source); if (!@$dom->schemaValidateSource($source)) { - throw new InvalidResourceException(sprintf('The "%s" is not a valid resource: ', $file, implode("\n", $this->getXmlErrors($internalErrors)))); + throw new InvalidResourceException(sprintf('Invalid resource provided: "%s"; Errors: %s', $file, implode("\n", $this->getXmlErrors($internalErrors)))); } $dom->normalizeDocument(); pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy