Changeset 098c36e for src/webservice/htdocs/SiWeather/Webservice
- Timestamp:
- Sep 1, 2015, 7:30:46 PM (11 years ago)
- Branches:
- master
- Children:
- cf345ee
- Parents:
- ff873dc
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/webservice/htdocs/SiWeather/Webservice/Setup.php
rff873dc r098c36e 326 326 327 327 # base_url needs to end with a /, otherwise the last element is chopped 328 $client = new \GuzzleHttp\Client 329 ( 330 [ 331 "base_uri" => $baseUrl, 332 "timeout" => 2.0, 333 "http_errors" => false, 334 ] 335 ); 336 $response = $client->get($url); 328 try{ 329 $client = new \GuzzleHttp\Client 330 ( 331 [ 332 "base_uri" => $baseUrl, 333 "timeout" => 2.0, 334 "http_errors" => false, 335 ] 336 ); 337 $response = $client->get($url); 338 } 339 catch(\GuzzleHttp\Exception\ConnectException $exception){ 340 $errorMessage = \Translator::swGettext("Webservce has not answered at url %s! Error: %s", $baseUrl, $exception->getMessage()); 341 return false; 342 } 337 343 if(is_null($response)){ 338 344 $errorMessage = \Translator::swGettext("Webservice has not answered at url %s!", $baseUrl);
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/siweather/chrome/site/your_project_logo.png)