PHP code example of thestormwinter / errorhandler

1. Go to this page and download the library: Download thestormwinter/errorhandler 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/ */

    

thestormwinter / errorhandler example snippets


PHP 7.1+


$this->handler = new \theStormwinter\ErrorHandler\ErrorHandler;
$this->handler->enable();

try{
...
ask for undefined variable
...
}catch(\theStormwinter\Exceptions\NoticeException $e){

echo $e->getMessage();
}

$this->handler->disable();