Move set_exception_handler to constructor

This commit is contained in:
billz 2023-12-27 05:35:03 +00:00
parent 36a6572971
commit adf44d462b

View file

@ -1,10 +1,6 @@
<?php
require_once 'src/RaspAP/Exceptions/ExceptionHandler.php';
// Import the ExceptionHandler class
use RaspAP\Exceptions\ExceptionHandler;
set_exception_handler(['RaspAP\Exceptions\ExceptionHandler', 'handleException']);
register_shutdown_function(['RaspAP\Exceptions\ExceptionHandler', 'handleFatalError']);
$handler = new RaspAP\Exceptions\ExceptionHandler;
?>