/**
  * Echoes an exception for the web.
  *
  * @param Exception $exception The exception
  * @return void
  */
 public function echoExceptionWeb(Exception $exception)
 {
     if (!headers_sent()) {
         header("HTTP/1.1 500 Internal Server Error");
     }
     $this->writeLogEntries($exception, self::CONTEXT_WEB);
     t3lib_timeTrack::debug_typo3PrintError(get_class($exception), $exception->getMessage(), 0, t3lib_div::getIndpEnv('TYPO3_SITE_URL'));
 }
 /**
  * Prints error msg/header.
  * Echoes out the HTML content
  *
  * @param	string		Message string
  * @param	string		Header string
  * @return	void
  * @see t3lib_timeTrack::debug_typo3PrintError()
  */
 function printError($label, $header = 'Error!')
 {
     t3lib_timeTrack::debug_typo3PrintError($header, $label, 0, t3lib_div::getIndpEnv('TYPO3_SITE_URL'));
 }
 /**
  * Updates the list of extensions.
  *
  * @param string $newExtList
  * @return void
  */
 protected function updateExtensionList($newExtList)
 {
     // Instance of install tool
     $instObj = t3lib_div::makeInstance('t3lib_install');
     $instObj->allowUpdateLocalConf = 1;
     $instObj->updateIdentity = 'TYPO3 Core Update Manager';
     try {
         // Get lines from localconf file
         $lines = $instObj->writeToLocalconf_control();
         $instObj->setValueInLocalconfFile($lines, '$TYPO3_CONF_VARS[\'EXT\'][\'extList\']', $newExtList);
         $result = $instObj->writeToLocalconf_control($lines);
         if ($result === 'nochange') {
             $message = 'DBAL was not loaded.';
             if (!@is_writable(PATH_typo3conf)) {
                 $message .= ' ' . PATH_typo3conf . ' is not writable!';
             }
             throw new Exception($message);
         }
         $GLOBALS['TYPO3_CONF_VARS']['EXT']['extList'] = $newExtList;
         // Make sure to get cache file for backend, not frontend
         $cacheFilePrefix = $GLOBALS['TYPO3_LOADED_EXT']['_CACHEFILE'];
         $GLOBALS['TYPO3_LOADED_EXT']['_CACHEFILE'] = str_replace('temp_CACHED_FE', 'temp_CACHED', $cacheFilePrefix);
         t3lib_extMgm::removeCacheFiles();
     } catch (Exception $e) {
         $header = 'Error';
         $message = $e->getMessage();
         t3lib_timeTrack::debug_typo3PrintError($header, $message, FALSE, t3lib_div::getIndpEnv('TYPO3_SITE_URL'));
         exit;
     }
 }