[TASK] Pass guzzle exception with report in case getUrl fails 26/48026/3
authorMarkus Klein <markus.klein@typo3.org>
Fri, 6 May 2016 14:21:15 +0000 (16:21 +0200)
committerNicole Cordes <typo3@cordes.co>
Fri, 6 May 2016 19:19:38 +0000 (21:19 +0200)
GeneralUtility::getUrl() may fail. Guzzle provides detailed information
in the exception it throws upon error.
Allow consumers of getUrl() to make more detailed failure analysis
by passing on the raw exception with the report.

Resolves: #76068
Releases: master
Change-Id: I63393a224695b5fd942da436672b3f75e1b1fc34
Reviewed-on: https://review.typo3.org/48026
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Nicole Cordes <typo3@cordes.co>
Tested-by: Nicole Cordes <typo3@cordes.co>
typo3/sysext/core/Classes/Utility/GeneralUtility.php

index 6a2eca3..18d975f 100755 (executable)
@@ -2035,6 +2035,7 @@ class GeneralUtility
                 if (isset($report)) {
                     $report['error'] = $exception->getHandlerContext()['errno'];
                     $report['message'] = $exception->getMessage();
+                    $report['exception'] = $exception;
                 }
                 return false;
             }