Jyxo\ErrorHandler::init PHP Method

init() public static method

Initializes error handling.
public static init ( boolean $debug = false )
$debug boolean Turn debugging on?
    public static function init(bool $debug = false)
    {
        // Sets debugging
        self::$debug = $debug;
        // Registers handlers
        set_error_handler([__CLASS__, 'handleError']);
        set_exception_handler([__CLASS__, 'handleException']);
        register_shutdown_function([__CLASS__, 'handleFatalError']);
    }