public function importFile(fs\file $file) { $this->log("Import : " . $file->asToken()); $doc = $this->getRoot()->importDocument($file->getDocument(), $file); $aResult = $this->parseChildren($doc->getChildren()); $this->getWindow()->parse($aResult); //return $aResult; }
protected function catchException(core\exception $e, fs\file $file = null) { if ($this->useLog()) { $this->getLogger()->addException($e->getMessage()); } if ($file) { $e->addPath($file->asToken()); } else { $e->addPath('No file defined'); } if ($this->throwExceptions()) { throw $e; } else { $e->save(false); } }
protected function readFile(fs\file $file) { $bDebug = $this->getFusion() ? $this->getFusion()->read('debug') : false; return "// {$file->asToken()}\n\n" . ($bDebug ? "console.log('load : {$file}');" . parent::readFile($file) : parent::readFile($file)); }
protected function catchExceptionCheck($sException, dom\element $test, core\exception $e, fs\file $file) { $bResult = false; if ($sException && $e instanceof $sException) { $bResult = true; } else { $e->addPath($file->asToken()); $e->addPath('Test ID : ' . $test->readAttribute('name')); if ($sException) { $e->addPath(sprintf('Exception of type %s expected', $sException)); } //$e->addPath($test->asString()); $e->save(false); } return $bResult; }