Changeset 141 for trunk/XJConf

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

merge changes from PRE_NAMESPACES branch

Files:

Legend:

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

    r121 r141  
    1818use net::xjconf::definitions::handler::DefinitionHandlerFactory; 
    1919use net::xjconf::exceptions::InvalidNamespaceDefinitionException; 
     20use net::xjconf::exceptions::XJConfException; 
    2021/** 
    2122 * Parse tag definitions files. 
     
    175176     * @param   string               $filename  filename of the defintions file 
    176177     * @return  NamespaceDefinition 
     178     * @throws  XJConfException 
    177179     * @throws  InvalidNamespaceDefinitionException 
    178180     */ 
     
    180182    { 
    181183        $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         
    183188        while ($this->reader->read()) { 
    184189            switch ($this->reader->nodeType) { 
  • 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) {