Internet: only catch InternetExceptions - anything else is an unexpected fault condition

This commit is contained in:
Dylan K. Taylor
2018-08-04 14:51:26 +01:00
parent 6614183c7f
commit f3f229ef7c
2 changed files with 5 additions and 4 deletions

View File

@ -86,7 +86,7 @@ class Internet{
try{
list($ret, $headers, $httpCode) = self::simpleCurl($page, $timeout, $extraHeaders);
return $ret;
}catch(\RuntimeException $ex){
}catch(InternetException $ex){
$err = $ex->getMessage();
return false;
}
@ -113,7 +113,7 @@ class Internet{
CURLOPT_POSTFIELDS => $args
]);
return $ret;
}catch(\RuntimeException $ex){
}catch(InternetException $ex){
$err = $ex->getMessage();
return false;
}