Skip to content

windaishi/PhpErrorReporter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

PhpErrorReporter

A more advanced error reporter for your PHP script.

Usage

Put this at the beginning of your script:

<?php
// ...

use \Windaishi\ErrorHandler\ErrorHandler;

require 'ErrorHandler.php';

$errorHandler = new ErrorHandler();
$errorHandler->setErrorReportingLevel(E_ALL & ~E_NOTICE & ~ 2048);
$errorHandler->setPrintAsHtml(true);
$errorHandler->setPrintExtendedHtml(true);
$errorHandler->setSendErrorHeader(true);
$errorHandler->setExitAfterEveryError(true);
$errorHandler->setSourceFileBlackListRegex('/(^\\/home\\/manuel\\/VIISON\\/Shopware\\/Installations)|(\\/vendor\\/)|(Components\\/Document\\.php$)/');
$errorHandler->setWriteToFile('lastError.html');
$errorHandler->setSystemCall(sprintf(
    'export DISPLAY=:0; google-chrome "%s" > /dev/null 2> /dev/null &',
    realpath('lastError.html')
));
$errorHandler->register();
?>

About

A more advanced error reporter for your PHP script.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages