XmlException
public function loadFile(string $filename) : DOMDocument { $reporting = error_reporting(0); $contents = file_get_contents($filename); error_reporting($reporting); if ($contents === false) { throw new XmlException(sprintf('Could not read XML from file "%s"', $filename)); } return $this->load($contents, $filename); }