Changeset 141 for trunk/XJConf
- Timestamp:
- 07/09/08 16:28:02 (5 months ago)
- Files:
-
- trunk/XJConf/DefinitionParser.php (modified) (3 diffs)
- trunk/XJConf/XmlParser.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/XJConf/DefinitionParser.php
r121 r141 18 18 use net::xjconf::definitions::handler::DefinitionHandlerFactory; 19 19 use net::xjconf::exceptions::InvalidNamespaceDefinitionException; 20 use net::xjconf::exceptions::XJConfException; 20 21 /** 21 22 * Parse tag definitions files. … … 175 176 * @param string $filename filename of the defintions file 176 177 * @return NamespaceDefinition 178 * @throws XJConfException 177 179 * @throws InvalidNamespaceDefinitionException 178 180 */ … … 180 182 { 181 183 $this->initParser(); 182 $this->reader->open($filename); 184 if (@$this->reader->open($filename) === false) { 185 throw new XJConfException('Can not open file ' . $filename); 186 } 187 183 188 while ($this->reader->read()) { 184 189 switch ($this->reader->nodeType) { trunk/XJConf/XmlParser.php
r138 r141 11 11 use net::xjconf::exceptions::UnknownNamespaceException; 12 12 use net::xjconf::exceptions::UnknownTagException; 13 use net::xjconf::exceptions::XJConfException; 13 14 use net::xjconf::ext::Extension; 14 15 /** … … 130 131 * parses a given file and creates the data structure described in this file 131 132 * 132 * @param string $filename 133 * @param string $filename 134 * @throws XJConfException 133 135 */ 134 136 public function parse($filename) … … 136 138 $reader = $this->initParser(); 137 139 array_push($this->openFiles, $filename); 138 $reader->open($filename); 140 if (@$reader->open($filename) === false) { 141 throw new XJConfException('Can not open file ' . $filename); 142 } 143 139 144 while ($reader->read()) { 140 145 switch ($reader->nodeType) {
