@@ -67,12 +67,10 @@ discard block |
||
| 67 | 67 | } |
| 68 | 68 | } |
| 69 | 69 | } |
| 70 | - } |
|
| 71 | - catch (\Exception $e) |
|
| 70 | + } catch (\Exception $e) |
|
| 72 | 71 | { |
| 73 | 72 | throw new MnsException($statusCode, $e->getMessage(), $e); |
| 74 | - } |
|
| 75 | - catch (\Throwable $t) |
|
| 73 | + } catch (\Throwable $t) |
|
| 76 | 74 | { |
| 77 | 75 | throw new MnsException($statusCode, $t->getMessage()); |
| 78 | 76 | } |
@@ -98,23 +96,19 @@ discard block |
||
| 98 | 96 | $result = XMLParser::parseNormalError($xmlReader); |
| 99 | 97 | |
| 100 | 98 | throw new MnsException($statusCode, $result['Message'], $exception, $result['Code'], $result['RequestId'], $result['HostId']); |
| 101 | - } |
|
| 102 | - catch (\Exception $e) |
|
| 99 | + } catch (\Exception $e) |
|
| 103 | 100 | { |
| 104 | 101 | if ($exception != NULL) |
| 105 | 102 | { |
| 106 | 103 | throw $exception; |
| 107 | - } |
|
| 108 | - elseif ($e instanceof MnsException) |
|
| 104 | + } elseif ($e instanceof MnsException) |
|
| 109 | 105 | { |
| 110 | 106 | throw $e; |
| 111 | - } |
|
| 112 | - else |
|
| 107 | + } else |
|
| 113 | 108 | { |
| 114 | 109 | throw new MnsException($statusCode, $e->getMessage()); |
| 115 | 110 | } |
| 116 | - } |
|
| 117 | - catch (\Throwable $t) |
|
| 111 | + } catch (\Throwable $t) |
|
| 118 | 112 | { |
| 119 | 113 | throw new MnsException($statusCode, $t->getMessage()); |
| 120 | 114 | } |
@@ -47,7 +47,7 @@ |
||
| 47 | 47 | } catch (\Exception $e) { |
| 48 | 48 | if ($exception != NULL) { |
| 49 | 49 | throw $exception; |
| 50 | - } elseif($e instanceof MnsException) { |
|
| 50 | + } elseif ($e instanceof MnsException) { |
|
| 51 | 51 | throw $e; |
| 52 | 52 | } else { |
| 53 | 53 | throw new MnsException($statusCode, $e->getMessage()); |
@@ -81,7 +81,7 @@ |
||
| 81 | 81 | } catch (\Exception $e) { |
| 82 | 82 | if ($exception != NULL) { |
| 83 | 83 | throw $exception; |
| 84 | - } elseif($e instanceof MnsException) { |
|
| 84 | + } elseif ($e instanceof MnsException) { |
|
| 85 | 85 | throw $e; |
| 86 | 86 | } else { |
| 87 | 87 | throw new MnsException($statusCode, $e->getMessage()); |
@@ -33,7 +33,7 @@ |
||
| 33 | 33 | } catch (\Exception $e) { |
| 34 | 34 | if ($exception != NULL) { |
| 35 | 35 | throw $exception; |
| 36 | - } elseif($e instanceof MnsException) { |
|
| 36 | + } elseif ($e instanceof MnsException) { |
|
| 37 | 37 | throw $e; |
| 38 | 38 | } else { |
| 39 | 39 | throw new MnsException($statusCode, $e->getMessage()); |
@@ -54,7 +54,7 @@ |
||
| 54 | 54 | } catch (\Exception $e) { |
| 55 | 55 | if ($exception != NULL) { |
| 56 | 56 | throw $exception; |
| 57 | - } elseif($e instanceof MnsException) { |
|
| 57 | + } elseif ($e instanceof MnsException) { |
|
| 58 | 58 | throw $e; |
| 59 | 59 | } else { |
| 60 | 60 | throw new MnsException($statusCode, $e->getMessage()); |
@@ -60,7 +60,7 @@ |
||
| 60 | 60 | } catch (\Exception $e) { |
| 61 | 61 | if ($exception != NULL) { |
| 62 | 62 | throw $exception; |
| 63 | - } elseif($e instanceof MnsException) { |
|
| 63 | + } elseif ($e instanceof MnsException) { |
|
| 64 | 64 | throw $e; |
| 65 | 65 | } else { |
| 66 | 66 | throw new MnsException($statusCode, $e->getMessage()); |
@@ -47,7 +47,7 @@ |
||
| 47 | 47 | } catch (\Exception $e) { |
| 48 | 48 | if ($exception != NULL) { |
| 49 | 49 | throw $exception; |
| 50 | - } elseif($e instanceof MnsException) { |
|
| 50 | + } elseif ($e instanceof MnsException) { |
|
| 51 | 51 | throw $e; |
| 52 | 52 | } else { |
| 53 | 53 | throw new MnsException($statusCode, $e->getMessage()); |
@@ -28,8 +28,7 @@ discard block |
||
| 28 | 28 | if ($statusCode == 200) |
| 29 | 29 | { |
| 30 | 30 | $this->succeed = TRUE; |
| 31 | - } |
|
| 32 | - else |
|
| 31 | + } else |
|
| 33 | 32 | { |
| 34 | 33 | $this->parseErrorResponse($statusCode, $content); |
| 35 | 34 | } |
@@ -38,12 +37,10 @@ discard block |
||
| 38 | 37 | |
| 39 | 38 | try { |
| 40 | 39 | $this->attributes = TopicAttributes::fromXML($xmlReader); |
| 41 | - } |
|
| 42 | - catch (\Exception $e) |
|
| 40 | + } catch (\Exception $e) |
|
| 43 | 41 | { |
| 44 | 42 | throw new MnsException($statusCode, $e->getMessage(), $e); |
| 45 | - } |
|
| 46 | - catch (\Throwable $t) |
|
| 43 | + } catch (\Throwable $t) |
|
| 47 | 44 | { |
| 48 | 45 | throw new MnsException($statusCode, $t->getMessage()); |
| 49 | 46 | } |
@@ -62,23 +59,19 @@ discard block |
||
| 62 | 59 | throw new TopicNotExistException($statusCode, $result['Message'], $exception, $result['Code'], $result['RequestId'], $result['HostId']); |
| 63 | 60 | } |
| 64 | 61 | throw new MnsException($statusCode, $result['Message'], $exception, $result['Code'], $result['RequestId'], $result['HostId']); |
| 65 | - } |
|
| 66 | - catch (\Exception $e) |
|
| 62 | + } catch (\Exception $e) |
|
| 67 | 63 | { |
| 68 | 64 | if ($exception != NULL) |
| 69 | 65 | { |
| 70 | 66 | throw $exception; |
| 71 | - } |
|
| 72 | - elseif ($e instanceof MnsException) |
|
| 67 | + } elseif ($e instanceof MnsException) |
|
| 73 | 68 | { |
| 74 | 69 | throw $e; |
| 75 | - } |
|
| 76 | - else |
|
| 70 | + } else |
|
| 77 | 71 | { |
| 78 | 72 | throw new MnsException($statusCode, $e->getMessage()); |
| 79 | 73 | } |
| 80 | - } |
|
| 81 | - catch (\Throwable $t) |
|
| 74 | + } catch (\Throwable $t) |
|
| 82 | 75 | { |
| 83 | 76 | throw new MnsException($statusCode, $t->getMessage()); |
| 84 | 77 | } |
@@ -95,7 +95,7 @@ |
||
| 95 | 95 | } catch (\Exception $e) { |
| 96 | 96 | if ($exception != NULL) { |
| 97 | 97 | throw $exception; |
| 98 | - } elseif($e instanceof MnsException) { |
|
| 98 | + } elseif ($e instanceof MnsException) { |
|
| 99 | 99 | throw $e; |
| 100 | 100 | } else { |
| 101 | 101 | throw new MnsException($statusCode, $e->getMessage()); |