src/Exception/ErrorMiddleware.php
/**
	 * Handles an uncaught exception.
	 *
	 * @param Exception|Error $exception
	 * @return void
	 */
Handles an uncaught exception.
@param Exception|Error $exception
@return void
Handles an uncaught exception . @param Exception|Error $exception @return void
public static function executeException($exception) {
		if (Application::environment() == 'console') {
			return Application::kernel()->console()->handleException($exception);
		}
		$reflect = new \ReflectionClass($exception);
		$shortName = $reflect->getShortName();
		$message = sprintf(
			"Uncaught exception '%s' with message '%s' in %s:%d Stack trace: %s",
			$shortName,
			$exception->getMessage(),
			$exception->getFile(),
			$exception->getLine(),
			$exception->getTraceAsString()
		);
		$error = new HorizonError($message, E_ERROR, $exception->getFile(), $exception->getLine(), 'exception', $exception);
		static::execute($error);
	}
public static function executeException ( $ exception ) { if ( Application :: environment ( ) == 'console' ) { return Application :: kernel ( ) -> console ( ) -> handleException ( $ exception ) ; } $ reflect = new \ ReflectionClass ( $ exception ) ; $ shortName = $ reflect -> getShortName ( ) ; $ message = sprintf ( " Uncaught exception '%s' with message '%s' in %s:%d Stack trace: %s " , $ shortName , $ exception -> getMessage ( ) , $ exception -> getFile ( ) , $ exception -> getLine ( ) , $ exception -> getTraceAsString ( ) ) ; $ error = new HorizonError ( $ message , E_ERROR , $ exception -> getFile ( ) , $ exception -> getLine ( ) , 'exception' , $ exception ) ; static :: execute ( $ error ) ; }
Handles an uncaught exception.
Handles an uncaught exception .
// Redirect console errors