Project

General

Profile

Bug #22461 ยป 20100415_RFC_14117.diff

Administrator Admin, 2010-04-15 09:46

View differences:

t3lib/error/class.t3lib_error_abstractexceptionhandler.php (working copy)
// write error message to the configured syslogs
t3lib_div::sysLog($logMessage, $logTitle, 4);
// In case an error occurs before a database connection exists, try
// to connect to the DB to be able to write the devlog/sys_log entry
if (isset($GLOBALS['TYPO3_DB']) && is_object($GLOBALS['TYPO3_DB']) && empty($GLOBALS['TYPO3_DB']->link)) {
$GLOBALS['TYPO3_DB']->connectDB();
}
// When database credentials are wrong, the exception is probably
// caused by this. Therefor we cannot do any database operation,
// otherwise this will lead into recurring exceptions.
try {
// In case an error occurs before a database connection exists, try
// to connect to the DB to be able to write the devlog/sys_log entry
if (isset($GLOBALS['TYPO3_DB']) && is_object($GLOBALS['TYPO3_DB']) && empty($GLOBALS['TYPO3_DB']->link)) {
$GLOBALS['TYPO3_DB']->connectDB();
}
// write error message to devlog
// see: $TYPO3_CONF_VARS['SYS']['enable_exceptionDLOG']
if (TYPO3_EXCEPTION_DLOG) {
t3lib_div::devLog($logMessage, $logTitle, 3, array(
'TYPO3_MODE' => TYPO3_MODE,
'backtrace' => $backtrace
));
// write error message to devlog
// see: $TYPO3_CONF_VARS['SYS']['enable_exceptionDLOG']
if (TYPO3_EXCEPTION_DLOG) {
t3lib_div::devLog($logMessage, $logTitle, 3, array(
'TYPO3_MODE' => TYPO3_MODE,
'backtrace' => $backtrace
));
}
// write error message to sys_log table
$this->writeLog($logTitle . ': ' . $logMessage);
} catch (Exception $exception) {
// Nothing happens here. It seems the database credentials are wrong
}
// write error message to sys_log table
$this->writeLog($logTitle . ': ' . $logMessage);
}
/**
    (1-1/1)