Adding the requested URL in the log message for uncaught Exceptions can
ease the task of finding the particular page causing an error.
Change-Id: I39ffb7943c39a406c651dc30b2b2351347f0cad4
Resolves: #25924
Reviewed-on: http://review.typo3.org/1587
Reviewed-by: Stefano Cecere
Tested-by: Tim Duelken
Reviewed-by: Andy Grunwald
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
$logTitle = 'Core: Exception handler (' . $context . ')';
$logMessage = 'Uncaught TYPO3 Exception: ' . $exceptionCodeNumber . $exception->getMessage() . ' | ' .
get_class($exception) . ' thrown in file ' . $filePathAndName . ' in line ' . $exception->getLine();
$logTitle = 'Core: Exception handler (' . $context . ')';
$logMessage = 'Uncaught TYPO3 Exception: ' . $exceptionCodeNumber . $exception->getMessage() . ' | ' .
get_class($exception) . ' thrown in file ' . $filePathAndName . ' in line ' . $exception->getLine();
+ if ($context === 'WEB') {
+ $logMessage .= '. Requested URL: ' . t3lib_div::getIndpEnv('TYPO3_REQUEST_URL');
+ }
+
$backtrace = $exception->getTrace();
// write error message to the configured syslogs
$backtrace = $exception->getTrace();
// write error message to the configured syslogs