Exemplo n.º 1
0
 protected function catchError(core\exception $e, $sQuery, array $aNS)
 {
     $this->throwException(sprintf('XPath error with "%s" : %s', $sQuery, $e->getMessage()), $this->nsAsToken($aNS));
 }
Exemplo n.º 2
0
 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);
     }
 }
Exemplo n.º 3
0
 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;
 }