This commit is contained in:
2024-04-27 09:23:34 +02:00
commit 11e713ca6f
11884 changed files with 3263371 additions and 0 deletions

27
WSDL/inc.error.php Normal file
View File

@@ -0,0 +1,27 @@
<?php
////
// Error handling
////
error_reporting( E_ERROR );
function handleError($errno, $errstr,$error_file,$error_line) { throw new Exception("Error [$errno]: $errstr - $error_file:$error_line"); }
set_error_handler("handleError");
error_reporting(0);
set_error_handler('myErrorHandler');
register_shutdown_function('fatalErrorShutdownHandler');
function myErrorHandler($code, $message, $file, $line)
{
die("Fatal Error: [$code] $message - $file:$line");
}
function fatalErrorShutdownHandler()
{
$last_error = error_get_last();
if ($last_error['type'] === E_ERROR)
{
// fatal error
myErrorHandler(E_ERROR, $last_error['message'], $last_error['file'], $last_error['line']);
}
}
?>