diff --git a/src/ErrorHandlers/ThrowErrorException.php b/src/ErrorHandlers/ThrowErrorException.php index ed7c241..bc2dd62 100644 --- a/src/ErrorHandlers/ThrowErrorException.php +++ b/src/ErrorHandlers/ThrowErrorException.php @@ -28,12 +28,13 @@ use ErrorException; /** * Throw internal errors as exceptions. * - * Usage: set_error_handler(new ThrowErrorException()); + * If registered as error handler, this converts an internal PHP error into an + * `ErrorException`. It respects the `error_reporting` directive. + * + * > Usage: `set_error_handler(new ThrowErrorException());` * * @author Sebastian Meyer * @package Basics\ErrorHandlers - * - * @api */ class ThrowErrorException { diff --git a/src/ErrorHandlers/TriggerExceptionError.php b/src/ErrorHandlers/TriggerExceptionError.php index 83b7f8c..adfd42c 100644 --- a/src/ErrorHandlers/TriggerExceptionError.php +++ b/src/ErrorHandlers/TriggerExceptionError.php @@ -28,12 +28,13 @@ use Throwable; /** * Trigger errors for uncaught exceptions. * - * Usage: set_exception_handler(new TriggerExceptionError()); + * If registered as exception handler, this catches an uncaught exception and + * convert it into an internal PHP error of severity `E_USER_ERROR`. + * + * > Usage: `set_exception_handler(new TriggerExceptionError());` * * @author Sebastian Meyer * @package Basics\ErrorHandlers - * - * @api */ class TriggerExceptionError {