src/Exception/ErrorMiddleware.php
/**
	 * Executes the given HorizonError (logs, renders, and reports), and then terminates the page if appropriate based
	 * on the severity level.
	 *
	 * @param HorizonError $error
	 * @return void
	 */
Executes the given HorizonError (logs, renders, and reports), and then terminates the page if appropriate based
on the severity level.

@param HorizonError $error
@return void
Executes the given HorizonError ( logs renders and reports ) and then terminates the page if appropriate based on the severity level . @param HorizonError $error @return void
public static function execute(HorizonError $error) {
		$errorHandler = static::getErrorHandler();
		if (static::canReport($error)) {
			call_user_func(array($errorHandler, 'report'), $error);
		}
		if (static::canLog($error)) {
			call_user_func(array($errorHandler, 'log'), $error);
		}
		if (static::canRender($error)) {
			call_user_func(array($errorHandler, 'render'), $error);
		}
		if (static::canTerminate($error)) {
			if (!static::canRender($error)) {
				static::getErrorHandler()->http(new HttpResponseException(500));
			}
			abort();
		}
	}
public static function execute ( HorizonError $ error ) { $ errorHandler = static :: getErrorHandler ( ) ; if ( static :: canReport ( $ error ) ) { call_user_func ( array ( $ errorHandler , 'report' ) , $ error ) ; } if ( static :: canLog ( $ error ) ) { call_user_func ( array ( $ errorHandler , 'log' ) , $ error ) ; } if ( static :: canRender ( $ error ) ) { call_user_func ( array ( $ errorHandler , 'render' ) , $ error ) ; } if ( static :: canTerminate ( $ error ) ) { if ( ! static :: canRender ( $ error ) ) { static :: getErrorHandler ( ) -> http ( new HttpResponseException ( 500 ) ) ; } abort ( ) ; } }
Executes the given HorizonError (logs, renders, and reports), and then terminates the page if appropriate based
 on the severity level.
Executes the given HorizonError ( logs renders and reports ) and then terminates the page if appropriate based on the severity level .
// Report the error // Log the error // Render the error // Terminate the page // If the error wasn't rendered, let's render the 500 error page