private function normalizeException(\Exception $exception) {
		$data = [
			'class'   => get_class($exception),
			'message' => $exception->getMessage(),
			'code'    => $exception->getCode(),
			'file'    => $exception->getFile() . ':' . $exception->getLine(),
		];
		$trace = $exception->getTraceAsString();
		$data['trace'] = $trace;

		$previous = $exception->getPrevious();
		if ($previous) {
			$data['previous'] = $this->normalizeException($previous);
		}

		return $data;
	}
private function normalizeException(\Exception $exception) {
		$data = [
			'class'   => get_class($exception),
			'message' => $exception->getMessage(),
			'code'    => $exception->getCode(),
			'file'    => $exception->getFile() . ':' . $exception->getLine(),
		];
		$trace = $exception->getTraceAsString();
		$data['trace'] = $trace;

		$previous = $exception->getPrevious();
		if ($previous) {
			$data['previous'] = $this->normalizeException($previous);
		}

		return $data;
	}
private function normalizeException ( \ Exception $ exception ) { $ data = [ 'class' => get_class ( $ exception ) , 'message' => $ exception -> getMessage ( ) , 'code' => $ exception -> getCode ( ) , 'file' => $ exception -> getFile ( ) . ':' . $ exception -> getLine ( ) , ] ; $ trace = $ exception -> getTraceAsString ( ) ; $ data [ 'trace' ] = $ trace ; $ previous = $ exception -> getPrevious ( ) ; if ( $ previous ) { $ data [ 'previous' ] = $ this -> normalizeException ( $ previous ) ; } return $ data ; }
Converts an Exception to String

@param \Exception $exception

@return string[]
Converts an Exception to String