Skip to content

Commit 72f1cb2

Browse files
author
Ivan Gavryshko
committed
MAGETWO-31422: XML file syntax error does not report file name error is in
- fixed static test.
1 parent c61ca21 commit 72f1cb2

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

lib/internal/Magento/Framework/Module/ModuleList/Loader.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ public function __construct(Filesystem $filesystem, Dom $converter, Parser $pars
5555
/**
5656
* Loads the full module list information
5757
*
58+
* @throws \Magento\Framework\Exception
5859
* @return array
5960
*/
6061
public function load()

lib/internal/Magento/Framework/Xml/Parser.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,10 @@ public function loadXML($string)
182182
*/
183183
public function errorHandler($errorNo, $errorStr, $errorFile, $errorLine)
184184
{
185-
throw new \Magento\Framework\Exception($errorStr);
185+
if ($errorNo == 0) {
186+
return false;
187+
}
188+
$message = "{$errorStr} in {$errorFile} on line {$errorLine}";
189+
throw new \Magento\Framework\Exception($message);
186190
}
187191
}

0 commit comments

Comments
 (0)