Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

catch the HTTP_Request2_Exception in the fetch() function

  • Loading branch information...
commit afc1cdd944ecba5c01917c48dc8a5525146ea1b3 1 parent d049617
hm2k hm2k authored

Showing 1 changed file with 7 additions and 3 deletions. Show diff stats Hide diff stats

  1. +7 3 Services/Mailman.php
10 Services/Mailman.php
@@ -197,9 +197,13 @@ protected function fetch($url)
197 197 if (!$url) {
198 198 throw new Services_Mailman_Exception('Invalid URL');
199 199 }
200   - $this->request->setUrl($url);
201   - $this->request->setMethod('GET');
202   - $html = $this->request->send()->getBody();
  200 + try {
  201 + $this->request->setUrl($url);
  202 + $this->request->setMethod('GET');
  203 + $html = $this->request->send()->getBody();
  204 + } catch (HTTP_Request2_Exception $e) {
  205 + throw new Services_Mailman_Exception($e);
  206 + }
203 207 if (strlen($html)>5) {
204 208 return $html;
205 209 }

0 comments on commit afc1cdd

Please sign in to comment.
Something went wrong with that request. Please try again.