PHP code example of wilon / exception

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

    

wilon / exception example snippets


    (new Wilon\Exception\Handler)->bootstrap();
    // Set error_reporting(-1) & Show debug.
    // Write log to ./exceptions.log


    $errorReporting = E_ALL ^ E_NOTICE;
    $showErrorInfo = true;

    (new Wilon\Exception\Handler)
        ->bootstrap($errorReporting, $showErrorInfo);

     // Set error_reporting(E_ALL ^ E_NOTICE) & Show debug.
     // Write log to ./exceptions.log .


    $loggerName = 'exceptions';
    $loggerFile = __DIR__ . '/exceptions.log';
    $errorReporting = E_ALL ^ E_NOTICE;
    $showErrorInfo = true;
    
    (new Wilon\Exception\Handler)
        ->setLogger($loggerName, $loggerFile)
        ->bootstrap($errorReporting, $showErrorInfo);