PHP Basics

TriggerExceptionError
in package

FinalYes

Triggers errors for uncaught exceptions.

If registered as exception handler, this catches any uncaught exception and converts it into an internal PHP error of severity E_USER_WARNING, then terminates the script with exit status 255 (just like a fatal error).

Usage: set_exception_handler(new TriggerExceptionError());

Tags
author

Sebastian Meyer sebastian.meyer@opencultureconsulting.com

Table of Contents

Methods

__invoke()  : never
Convert an uncaught exception into an PHP error.

Methods

__invoke()

Convert an uncaught exception into an PHP error.

public __invoke(Throwable $exception) : never
Parameters
$exception : Throwable

The exception

Tags
SuppressWarnings

("PHPMD.ExitExpression")

Return values
never

        
On this page

Search results