From: Steffen Gebert Date: Tue, 12 Apr 2011 18:13:33 +0000 (+0200) Subject: [FEATURE] Include Request URL in Exception log X-Git-Tag: TYPO3_4-6-0alpha1~62 X-Git-Url: http://git.typo3.org/Packages/TYPO3.CMS.git/commitdiff_plain/e04e56d8b360f59749b6e63a752c2c0121ae67fb [FEATURE] Include Request URL in Exception log 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 --- diff --git a/t3lib/error/class.t3lib_error_abstractexceptionhandler.php b/t3lib/error/class.t3lib_error_abstractexceptionhandler.php index be5de69ef69a..a8a3f1c36201 100644 --- a/t3lib/error/class.t3lib_error_abstractexceptionhandler.php +++ b/t3lib/error/class.t3lib_error_abstractexceptionhandler.php @@ -66,6 +66,10 @@ abstract class t3lib_error_AbstractExceptionHandler implements t3lib_error_Excep $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