PHP code example of portrino / typo3-whoops
1. Go to this page and download the library: Download portrino/typo3-whoops library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
portrino / typo3-whoops example snippets
$GLOBALS['TYPO3_CONF_VARS']['SYS']['debugExceptionHandler'] =
\Portrino\Typo3Whoops\Error\WhoopsExceptionHandler::class;
$GLOBALS['TYPO3_CONF_VARS']['SYS']['productionExceptionHandler'] =
\Portrino\Typo3Whoops\Error\WhoopsExceptionHandler::class;
$applicationContext = \TYPO3\CMS\Core\Utility\GeneralUtility::getApplicationContext()->__toString();
if (strpos($applicationContext, 'Development') !== false) {
$GLOBALS['TYPO3_CONF_VARS']['SYS']['debugExceptionHandler'] =
\Portrino\Typo3Whoops\Error\WhoopsExceptionHandler::class;
$GLOBALS['TYPO3_CONF_VARS']['SYS']['productionExceptionHandler'] =
\Portrino\Typo3Whoops\Error\WhoopsExceptionHandler::class;
}
$GLOBALS['TYPO3_CONF_VARS']['SYS']['debugExceptionHandler'] =
\Portrino\Typo3Whoops\Compatibility\Error\WhoopsExceptionHandler::class;
$GLOBALS['TYPO3_CONF_VARS']['SYS']['productionExceptionHandler'] =
\Portrino\Typo3Whoops\Compatibility\Error\WhoopsExceptionHandler::class;