@@ -74,7 +74,8 @@ |
||
| 74 | 74 | $this->tmdb->checkOptionLanguage($options, $this->params); |
| 75 | 75 | |
| 76 | 76 | $this->data = $this->tmdb->getRequest($item_name . '/' . (int) $item_id, $this->params); |
| 77 | - } catch (TmdbException $ex) { |
|
| 77 | + } |
|
| 78 | + catch (TmdbException $ex) { |
|
| 78 | 79 | throw $ex; |
| 79 | 80 | } |
| 80 | 81 | } |
@@ -53,7 +53,8 @@ |
||
| 53 | 53 | $this->tmdb->checkOptionLanguage($options, $this->params); |
| 54 | 54 | |
| 55 | 55 | $this->data = $this->tmdb->getRequest('person/' . $item_id . '/' . $item_type . '_credits', $this->params); |
| 56 | - } catch (TmdbException $ex) { |
|
| 56 | + } |
|
| 57 | + catch (TmdbException $ex) { |
|
| 57 | 58 | throw $ex; |
| 58 | 59 | } |
| 59 | 60 | } |
@@ -168,15 +168,15 @@ |
||
| 168 | 168 | try { |
| 169 | 169 | $res = new \stdClass(); |
| 170 | 170 | switch ($method) { |
| 171 | - case "GET": |
|
| 171 | + case "GET": |
|
| 172 | 172 | $res = $this->http_request->getResponse($url); |
| 173 | - break; |
|
| 174 | - case "POST": |
|
| 173 | + break; |
|
| 174 | + case "POST": |
|
| 175 | 175 | $res = $this->http_request->postResponse($url, [], $form_params); |
| 176 | - break; |
|
| 177 | - case "DELETE": |
|
| 176 | + break; |
|
| 177 | + case "DELETE": |
|
| 178 | 178 | $res = $this->http_request->deleteResponse($url); |
| 179 | - break; |
|
| 179 | + break; |
|
| 180 | 180 | } |
| 181 | 181 | $response = $this->decodeRequest($res, $method, $url, $form_params); |
| 182 | 182 | return $response; |
@@ -180,7 +180,8 @@ discard block |
||
| 180 | 180 | } |
| 181 | 181 | $response = $this->decodeRequest($res, $method, $url, $form_params); |
| 182 | 182 | return $response; |
| 183 | - } catch (TmdbException $e) { |
|
| 183 | + } |
|
| 184 | + catch (TmdbException $e) { |
|
| 184 | 185 | $this->logger->error('sendRequest failed : '.$e->getMessage(), array('method' => $method, 'url' => $url, 'form_params' => $form_params)); |
| 185 | 186 | throw $e; |
| 186 | 187 | } |
@@ -245,7 +246,8 @@ discard block |
||
| 245 | 246 | $this->configuration = $this->getRequest('configuration'); |
| 246 | 247 | } |
| 247 | 248 | return $this->configuration; |
| 248 | - } catch (TmdbException $ex) { |
|
| 249 | + } |
|
| 250 | + catch (TmdbException $ex) { |
|
| 249 | 251 | throw $ex; |
| 250 | 252 | } |
| 251 | 253 | } |