@@ -139,8 +139,7 @@ |
||
139 | 139 | try |
140 | 140 | { |
141 | 141 | $decoded = (array) JWT::decode($token, $this->uapay_public_key(), array('RS512')); |
142 | - } |
|
143 | - catch (\Exception $e) |
|
142 | + } catch (\Exception $e) |
|
144 | 143 | { |
145 | 144 | Log::instance()->error($e->getMessage().PHP_EOL.$e->getTraceAsString()); |
146 | 145 | throw new Exception\JSON('unable to decode JWT token', $e); |
@@ -22,8 +22,7 @@ |
||
22 | 22 | $this->check_exists($fname); |
23 | 23 | |
24 | 24 | $key = $this->load($fname); |
25 | - } |
|
26 | - catch (\Exception $e) |
|
25 | + } catch (\Exception $e) |
|
27 | 26 | { |
28 | 27 | throw new Exception\Runtime('The file with the '.$type.' key was '.$e->getMessage().'!'); |
29 | 28 | } |
@@ -199,8 +199,7 @@ discard block |
||
199 | 199 | try |
200 | 200 | { |
201 | 201 | $token = JWT::encode($payload, $this->own_private_key(), 'RS512'); |
202 | - } |
|
203 | - catch (\Exception $e) |
|
202 | + } catch (\Exception $e) |
|
204 | 203 | { |
205 | 204 | Log::instance()->error($e->getMessage().PHP_EOL.$e->getTraceAsString()); |
206 | 205 | throw new Exception\JSON('unable to create JWT token', $e); |
@@ -229,8 +228,7 @@ discard block |
||
229 | 228 | $body = $httpresponse->getBody()->getContents(); |
230 | 229 | Log::instance()->debug('got response:'.PHP_EOL.$body); |
231 | 230 | return new $this->response_class($body, $this->jwt); |
232 | - } |
|
233 | - catch (\GuzzleHttp\Exception\RequestException $e) |
|
231 | + } catch (\GuzzleHttp\Exception\RequestException $e) |
|
234 | 232 | { |
235 | 233 | $this->handle_request_exception($e); |
236 | 234 | } |