From e04e56d8b360f59749b6e63a752c2c0121ae67fb Mon Sep 17 00:00:00 2001 From: Steffen Gebert Date: Tue, 12 Apr 2011 20:13:33 +0200 Subject: [PATCH] [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 --- t3lib/error/class.t3lib_error_abstractexceptionhandler.php | 4 ++++ 1 file changed, 4 insertions(+) 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 -- 2.20.1