2 namespace TYPO3\CMS\Core\Error;
58 if ($exception->getCode() === 1396795884) {
61 $filePathAndName = $exception->getFile();
62 $exceptionCodeNumber = $exception->getCode() > 0 ?
'#' . $exception->getCode() .
': ' :
'';
63 $logTitle =
'Core: Exception handler (' . $context .
')';
64 $logMessage =
'Uncaught TYPO3 Exception: ' . $exceptionCodeNumber . $exception->getMessage() .
' | '
65 . get_class($exception) .
' thrown in file ' . $filePathAndName .
' in line ' . $exception->getLine();
66 if ($context ===
'WEB') {
69 $backtrace = $exception->getTrace();
78 if (TYPO3_EXCEPTION_DLOG) {
80 'TYPO3_MODE' => TYPO3_MODE,
81 'backtrace' => $backtrace
85 $this->
writeLog($logTitle .
': ' . $logMessage);
99 if (!is_object($databaseConnection) || !$databaseConnection->isConnected()) {
104 if (is_object(
$GLOBALS[
'BE_USER'])) {
105 if (isset(
$GLOBALS[
'BE_USER']->user[
'uid'])) {
106 $userId =
$GLOBALS[
'BE_USER']->user[
'uid'];
108 if (isset(
$GLOBALS[
'BE_USER']->workspace)) {
109 $workspace =
$GLOBALS[
'BE_USER']->workspace;
112 $fields_values = array(
118 'details' => str_replace(
'%',
'%%', $logMessage),
121 'workspace' => $workspace
123 $databaseConnection->exec_INSERTquery(
'sys_log', $fields_values);
135 if (method_exists($exception,
'getStatusHeaders')) {
136 $headers = $exception->getStatusHeaders();
138 $headers = array(\TYPO3\CMS\Core\Utility\HttpUtility::HTTP_STATUS_500);
140 if (!headers_sent()) {
141 foreach ($headers as $header) {