src/Exception/HorizonError.php
/**
	 * Converts the given exception into a HorizonError instance.
	 *
	 * @param Exception|Error $ex
	 * @return HorizonError
	 */
Converts the given exception into a HorizonError instance.
@param Exception|Error $ex
@return HorizonError
Converts the given exception into a HorizonError instance . @param Exception|Error $ex @return HorizonError
public static function fromException($exception, $uncaught = true) {
		$reflect = new \ReflectionClass($exception);
		$shortName = $reflect->getShortName();
		$prefix = $uncaught ? 'Uncaught ' : '';
		$message = sprintf(
			"{$prefix}exception '%s' with message '%s' in %s:%d Stack trace: %s",
			$shortName,
			$exception->getMessage(),
			$exception->getFile(),
			$exception->getLine(),
			$exception->getTraceAsString()
		);
		return new static($message, E_ERROR, $exception->getFile(), $exception->getLine(), 'exception', $exception);
	}
public static function fromException ( $ exception , $ uncaught = true ) { $ reflect = new \ ReflectionClass ( $ exception ) ; $ shortName = $ reflect -> getShortName ( ) ; $ prefix = $ uncaught ? 'Uncaught ' : '' ; $ message = sprintf ( " { $ prefix } exception '%s' with message '%s' in %s:%d Stack trace: %s " , $ shortName , $ exception -> getMessage ( ) , $ exception -> getFile ( ) , $ exception -> getLine ( ) , $ exception -> getTraceAsString ( ) ) ; return new static ( $ message , E_ERROR , $ exception -> getFile ( ) , $ exception -> getLine ( ) , 'exception' , $ exception ) ; }
Converts the given exception into a HorizonError instance.
Converts the given exception into a HorizonError instance .