From 39d6cd31e617cf22b1c4f8f12d846767e6dae967 Mon Sep 17 00:00:00 2001 From: Sebastian Meyer Date: Sun, 12 Nov 2023 15:56:57 +0100 Subject: [PATCH] Rename errorhandler --- src/Functions/{throwError.php => throwErrorException.php} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename src/Functions/{throwError.php => throwErrorException.php} (91%) diff --git a/src/Functions/throwError.php b/src/Functions/throwErrorException.php similarity index 91% rename from src/Functions/throwError.php rename to src/Functions/throwErrorException.php index debfe54..5eb94a2 100644 --- a/src/Functions/throwError.php +++ b/src/Functions/throwErrorException.php @@ -26,7 +26,7 @@ use ErrorException; /** * Handles an internal PHP error and throws it as ErrorException. - * @example set_error_handler('\\OCC\\Basics\\Functions\\throwError', E_ALL); + * @example set_error_handler('\\OCC\\Basics\\Functions\\throwErrorException'); * * @author Sebastian Meyer * @package opencultureconsulting/basics @@ -40,7 +40,7 @@ use ErrorException; * * @throws \ErrorException */ -function throwError(int $severity = E_ALL, string $message = '', ?string $filename = null, ?int $line = null): bool +function throwErrorException(int $severity = E_ALL, string $message = '', ?string $filename = null, ?int $line = null): bool { if (error_reporting() & $severity) { throw new ErrorException($message, 0, $severity, $filename, $line);