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 catchError(core\exception $e, $sQuery, array $aNS) { $this->throwException(sprintf('XPath error with "%s" : %s', $sQuery, $e->getMessage()), $this->nsAsToken($aNS)); }