Create error handler for TYPO3 v6.
Get rid of one global variable.