Show
Ignore:
Timestamp:
07/09/08 16:28:02 (6 months ago)
Author:
mikey
Message:

merge changes from PRE_NAMESPACES branch

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/XJConf/XmlParser.php

    r138 r141  
    1111use net::xjconf::exceptions::UnknownNamespaceException; 
    1212use net::xjconf::exceptions::UnknownTagException; 
     13use net::xjconf::exceptions::XJConfException; 
    1314use net::xjconf::ext::Extension; 
    1415/** 
     
    130131     * parses a given file and creates the data structure described in this file 
    131132     * 
    132      * @param  string  $filename 
     133     * @param   string  $filename 
     134     * @throws  XJConfException 
    133135     */ 
    134136    public function parse($filename) 
     
    136138        $reader = $this->initParser(); 
    137139        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         
    139144        while ($reader->read()) { 
    140145            switch ($reader->nodeType) {