Index: t3lib/class.t3lib_beuserauth.php =================================================================== --- t3lib/class.t3lib_beuserauth.php (Revision 9067) +++ t3lib/class.t3lib_beuserauth.php (Arbeitskopie) @@ -214,12 +214,10 @@ $this->backendSetUC(); // Setting the UC array. It's needed with fetchGroupData first, due to default/overriding of values. $this->emailAtLogin(); // email at login - if option set. } else { - t3lib_BEfunc::typo3PrintError ('Login-error','TYPO3 is in maintenance mode at the moment. Only administrators are allowed access.',0); - exit; + throw new RuntimeError('Login Error: TYPO3 is in maintenance mode at the moment. Only administrators are allowed access.'); } } else { - t3lib_BEfunc::typo3PrintError ('Login-error','IP locking prevented you from being authorized. Can\'t proceed, sorry.',0); - exit; + throw new RuntimeError('Login-error: IP locking prevented you from being authorized. Can\'t proceed, sorry.'); } } } Index: t3lib/class.t3lib_treeview.php =================================================================== --- t3lib/class.t3lib_treeview.php (Revision 9067) +++ t3lib/class.t3lib_treeview.php (Arbeitskopie) @@ -772,9 +772,8 @@ $newID = $row['uid']; - if ($newID==0) { - t3lib_BEfunc::typo3PrintError ('Endless recursion detected', 'TYPO3 has detected an error in the database. Please fix it manually (e.g. using phpMyAdmin) and change the UID of '.$this->table.':0 to a new value.

See bugs.typo3.org/view.php?id=3495 to get more information about a possible cause.',0); - exit; + if ($newID == 0) { + throw new RuntimeException('Endless recursion detected: TYPO3 has detected an error in the database. Please fix it manually (e.g. using phpMyAdmin) and change the UID of '.$this->table.':0 to a new value.

See bugs.typo3.org/view.php?id=3495 to get more information about a possible cause.'); } $this->tree[]=array(); // Reserve space. Index: t3lib/error/class.t3lib_error_productionexceptionhandler.php =================================================================== --- t3lib/error/class.t3lib_error_productionexceptionhandler.php (Revision 9067) +++ t3lib/error/class.t3lib_error_productionexceptionhandler.php (Arbeitskopie) @@ -55,8 +55,8 @@ 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')); + $messageObj = t3lib_div::makeInstance('t3lib_message_ErrorPageMessage', $exception->getMessage(), get_class($exception)); + $messageObj->output(); } /** Index: t3lib/class.t3lib_userauthgroup.php =================================================================== --- t3lib/class.t3lib_userauthgroup.php (Revision 9067) +++ t3lib/class.t3lib_userauthgroup.php (Arbeitskopie) @@ -267,9 +267,8 @@ } } } - if ($exitOnError) { - t3lib_BEfunc::typo3PrintError ('Access Error','This page is not within your DB-mounts',0); - exit; + if ($exitOnError) { + throw new RuntimeException('Access Error: This page is not within your DB-mounts'); } } @@ -282,9 +281,8 @@ */ function modAccess($conf,$exitOnError) { if (!t3lib_BEfunc::isModuleSetInTBE_MODULES($conf['name'])) { - if ($exitOnError) { - t3lib_BEfunc::typo3PrintError ('Fatal Error','This module "'.$conf['name'].'" is not enabled in TBE_MODULES',0); - exit; + if ($exitOnError) { + throw new RuntimeException('Fatal Error: This module "'.$conf['name'].'" is not enabled in TBE_MODULES'); } return FALSE; } @@ -296,9 +294,8 @@ ($this->workspace>0 && t3lib_div::inList($conf['workspaces'],'custom'))) { // ok, go on... } else { - if ($exitOnError) { - t3lib_BEfunc::typo3PrintError ('Workspace Error','This module "'.$conf['name'].'" is not available under the current workspace',0); - exit; + if ($exitOnError) { + throw new RuntimeException('Workspace Error: This module "'.$conf['name'].'" is not available under the current workspace'); } return FALSE; } @@ -312,9 +309,10 @@ $acs = $this->check('modules',$conf['name']); } if (!$acs && $exitOnError) { - t3lib_BEfunc::typo3PrintError ('Access Error','You don\'t have access to this module.',0); - exit; - } else return $acs; + throw new RuntimeException('Access Error: You don\'t have access to this module.'); + } else { + return $acs; + } } /** Index: typo3/file_list.php =================================================================== --- typo3/file_list.php (Revision 9067) +++ typo3/file_list.php (Arbeitskopie) @@ -46,6 +46,6 @@ } else { $title = sprintf($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:extension.not.installed'), 'list'); $message = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:link.to.filelist.correctly'); - t3lib_BEfunc::typo3PrintError($title, $message); + throw new RuntimeException($title . ': ' . $message); } ?> \ No newline at end of file Index: typo3/index.php =================================================================== --- typo3/index.php (Revision 9067) +++ typo3/index.php (Arbeitskopie) @@ -366,8 +366,7 @@ if ($this->commandLI=='setCookie') { // we tried it a second time but still no cookie // 26/4 2005: This does not work anymore, because the saving of challenge values in $_SESSION means the system will act as if the password was wrong. - t3lib_BEfunc::typo3PrintError ('Login-error',"Yeah, that's a classic. No cookies, no TYPO3.

Please accept cookies from TYPO3 - otherwise you'll not be able to use the system.",0); - exit; + throw new RuntimeException('Login-error: Yeah, that\'s a classic. No cookies, no TYPO3.

Please accept cookies from TYPO3 - otherwise you\'ll not be able to use the system.'); } else { // try it once again - that might be needed for auto login $this->redirectToURL = 'index.php?commandLI=setCookie'; Index: typo3/wizard_forms.php =================================================================== --- typo3/wizard_forms.php (Revision 9067) +++ typo3/wizard_forms.php (Arbeitskopie) @@ -316,9 +316,8 @@ // First, check the references by selecting the record: $row = t3lib_BEfunc::getRecord($this->P['table'],$this->P['uid']); - if (!is_array($row)) { - t3lib_BEfunc::typo3PrintError ('Wizard Error','No reference to record',0); - exit; + if (!is_array($row)) { + throw new RuntimeException('Wizard Error: No reference to record'); } // This will get the content of the form configuration code field to us - possibly cleaned up, saved to database etc. if the form has been submitted in the meantime. Index: typo3/file_rename.php =================================================================== --- typo3/file_rename.php (Revision 9067) +++ typo3/file_rename.php (Arbeitskopie) @@ -121,9 +121,10 @@ $this->target=''; } $key=$this->basicff->checkPathAgainstMounts($this->target.'/'); - if (!$this->target || !$key) { - t3lib_BEfunc::typo3PrintError ($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_file_list.xml:paramError', true), $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_file_list.xml:targetNoDir', true), ''); - exit; + if (!$this->target || !$key) { + $title = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_file_list.xml:paramError', TRUE); + $message = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_file_list.xml:targetNoDir', TRUE); + throw new RuntimeException($title . ': ' . $message); } // Finding the icon Index: typo3/wizard_table.php =================================================================== --- typo3/wizard_table.php (Revision 9067) +++ typo3/wizard_table.php (Arbeitskopie) @@ -235,9 +235,8 @@ // First, check the references by selecting the record: $row = t3lib_BEfunc::getRecord($this->P['table'],$this->P['uid']); - if (!is_array($row)) { - t3lib_BEfunc::typo3PrintError ('Wizard Error','No reference to record',0); - exit; + if (!is_array($row)) { + throw new RuntimeException('Wizard Error: No reference to record'); } // This will get the content of the form configuration code field to us - possibly cleaned up, saved to database etc. if the form has been submitted in the meantime. Index: typo3/file_edit.php =================================================================== --- typo3/file_edit.php (Revision 9067) +++ typo3/file_edit.php (Arbeitskopie) @@ -110,9 +110,10 @@ $this->target=''; } $key=$this->basicff->checkPathAgainstMounts($this->target.'/'); - if (!$this->target || !$key) { - t3lib_BEfunc::typo3PrintError($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_file_list.xml:paramError', true), $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_file_list.xml:targetNoDir', true), ''); - exit; + if (!$this->target || !$key) { + $title = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_file_list.xml:paramError', TRUE); + $message = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_file_list.xml:targetNoDir', TRUE); + throw new RuntimeException($title . ': ' . $message); } // Finding the icon switch($GLOBALS['FILEMOUNTS'][$key]['type']) { Index: typo3/file_newfolder.php =================================================================== --- typo3/file_newfolder.php (Revision 9067) +++ typo3/file_newfolder.php (Arbeitskopie) @@ -133,9 +133,10 @@ $this->target = $this->charsetConversion->conv($this->target, 'utf-8', $GLOBALS['LANG']->charSet); $this->target = $this->basicff->is_directory($this->target); $key=$this->basicff->checkPathAgainstMounts($this->target.'/'); - if (!$this->target || !$key) { - t3lib_BEfunc::typo3PrintError ($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_file_list.xml:paramError', true), $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_file_list.xml:targetNoDir', true), ''); - exit; + if (!$this->target || !$key) { + $title = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_file_list.xml:paramError', TRUE); + $message = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_file_list.xml:targetNoDir', TRUE); + throw new RuntimeException($title . ': ' . $message); } // Finding the icon Index: typo3/init.php =================================================================== --- typo3/init.php (Revision 9067) +++ typo3/init.php (Arbeitskopie) @@ -274,9 +274,8 @@ // ********************** // Check Hardcoded lock on BE: // ********************** -if ($TYPO3_CONF_VARS['BE']['adminOnly'] < 0) { - t3lib_BEfunc::typo3printError('Backend locked', 'Backend and Install Tool are locked for maintenance. [BE][adminOnly] is set to "' . intval($TYPO3_CONF_VARS['BE']['adminOnly']) . '".'); - exit; +if ($TYPO3_CONF_VARS['BE']['adminOnly'] < 0) { + throw new RuntimeException('TYPO3 Backend locked: Backend and Install Tool are locked for maintenance. [BE][adminOnly] is set to "' . intval($TYPO3_CONF_VARS['BE']['adminOnly']) . '".'); } if (!(TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_CLI) && @is_file(PATH_typo3conf . 'LOCK_BACKEND')) { if (TYPO3_PROCEED_IF_NO_USER == 2) { @@ -286,7 +285,7 @@ if ($fContent) { header('Location: '.$fContent); // Redirect } else { - t3lib_BEfunc::typo3printError('Backend locked', 'Browser backend is locked for maintenance. Remove lock by removing the file "typo3conf/LOCK_BACKEND" or use CLI-scripts.'); + throw new RuntimeException('TYPO3 Backend locked: Browser backend is locked for maintenance. Remove lock by removing the file "typo3conf/LOCK_BACKEND" or use CLI-scripts.'); } exit; } @@ -369,15 +368,12 @@ // ************************* if ($TYPO3_DB->sql_pconnect(TYPO3_db_host, TYPO3_db_username, TYPO3_db_password)) { if (!TYPO3_db) { - t3lib_BEfunc::typo3PrintError('Database Error', 'No database selected'); - exit; + throw new RuntimeException('Database Error: No database selected', time()); } elseif (!$TYPO3_DB->sql_select_db(TYPO3_db)) { - t3lib_BEfunc::typo3PrintError('Database Error', 'Cannot connect to the current database, "' . TYPO3_db . '"'); - exit; + throw new RuntimeException('Database Error: Cannot connect to the current database, "' . TYPO3_db . '"', time()); } } else { - t3lib_BEfunc::typo3PrintError('Database Error', 'The current username, password or host was not accepted when the connection to the database was attempted to be established!'); - exit; + throw new RuntimeException('Database Error: The current username, password or host was not accepted when the connection to the database was attempted to be established!', time()); } @@ -385,8 +381,7 @@ // Checks for proper browser // ******************************* if (!$CLIENT['BROWSER'] && !(TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_CLI)) { - t3lib_BEfunc::typo3PrintError ('Browser error','Your browser version looks incompatible with this TYPO3 version!',0); - exit; + throw new RuntimeException('Browser Error: Your browser version looks incompatible with this TYPO3 version!', time()); } Index: typo3/sysext/simulatestatic/class.tx_simulatestatic.php =================================================================== --- typo3/sysext/simulatestatic/class.tx_simulatestatic.php (Revision 9067) +++ typo3/sysext/simulatestatic/class.tx_simulatestatic.php (Arbeitskopie) @@ -107,7 +107,8 @@ $message = 'PATH_INFO was not configured for this website, and the URL tries to find the page by PATH_INFO!'; header(t3lib_utility_Http::HTTP_STATUS_503); t3lib_div::sysLog($message, 'cms', t3lib_div::SYSLOG_SEVERITY_ERROR); - $parentObject->printError($message.'

Click here to get to the right page.','Error: PATH_INFO not configured'); + $message = 'Error: PATH_INFO not configured: ' . $message . '

Click here to get to the right page.'; + throw new RuntimeException($message); } } else { t3lib_utility_Http::redirect($redirectUrl); Index: typo3/sysext/lang/lang.php =================================================================== --- typo3/sysext/lang/lang.php (Revision 9067) +++ typo3/sysext/lang/lang.php (Arbeitskopie) @@ -164,10 +164,7 @@ $this->charSet = $GLOBALS['TYPO3_CONF_VARS']['BE']['forceCharset']; if ($this->charSet != 'utf-8' && !$this->csConvObj->initCharset($this->charSet)) { - t3lib_BEfunc::typo3PrintError('Forced charset not found', - 'The forced character set "'. $this->charSet . '" was not found in t3lib/csconvtbl/' - ); - exit; + throw new RuntimeException('Forced charset not found: The forced character set "'. $this->charSet . '" was not found in t3lib/csconvtbl/'); } } } Index: typo3/sysext/cms/tslib/class.tslib_fe.php =================================================================== --- typo3/sysext/cms/tslib/class.tslib_fe.php (Revision 9067) +++ typo3/sysext/cms/tslib/class.tslib_fe.php (Arbeitskopie) @@ -498,7 +498,7 @@ } if ($link !== FALSE) { if (!TYPO3_db) { - $this->printError('No database selected','Database Error'); + throw new RuntimeException('Database Error: No database selected'); // Redirects to the Install Tool: echo '