Completed
Push — develop ( d46380...4bf157 )
by Stan
03:03
created
src/Storage/StorageManager.php 1 patch
Braces   +16 added lines, -8 removed lines patch added patch discarded remove patch
@@ -65,7 +65,8 @@  discard block
 block discarded – undo
65 65
                     return $metric->builder($items)
66 66
                                   ->samples();
67 67
             }
68
-        } catch (Exception $e) {
68
+        }
69
+        catch (Exception $e) {
69 70
             $class = get_class($metric);
70 71
 
71 72
             throw new StorageException("Failed to collect the samples of [{$class}]: {$e->getMessage()}", 0, $e);
@@ -83,9 +84,11 @@  discard block
 block discarded – undo
83 84
                 $this->labeled($metric, $labels)->toJson(),
84 85
                 $value
85 86
             );
86
-        } catch (LabelException $e) {
87
+        }
88
+        catch (LabelException $e) {
87 89
             throw $e;
88
-        } catch (Exception $e) {
90
+        }
91
+        catch (Exception $e) {
89 92
             $class = get_class($metric);
90 93
 
91 94
             throw new StorageException("Failed to increment [{$class}] by `{$value}`: {$e->getMessage()}", 0, $e);
@@ -103,9 +106,11 @@  discard block
 block discarded – undo
103 106
                 $this->labeled($metric, $labels)->toJson(),
104 107
                 $value
105 108
             );
106
-        } catch (LabelException $e) {
109
+        }
110
+        catch (LabelException $e) {
107 111
             throw $e;
108
-        } catch (Exception $e) {
112
+        }
113
+        catch (Exception $e) {
109 114
             $class = get_class($metric);
110 115
 
111 116
             throw new StorageException("Failed to decrement [{$class}] by `{$value}`: {$e->getMessage()}", 0, $e);
@@ -133,7 +138,8 @@  discard block
 block discarded – undo
133 138
                 $this->repository->set($key, $field, $identifier, false);
134 139
                 $this->repository->push($identifier, $value);
135 140
             }
136
-        } catch (Exception $e) {
141
+        }
142
+        catch (Exception $e) {
137 143
             $class = get_class($metric);
138 144
 
139 145
             throw new StorageException("Failed to observe [{$class}] with `{$value}`: {$e->getMessage()}", 0, $e);
@@ -151,9 +157,11 @@  discard block
 block discarded – undo
151 157
                 $this->labeled($metric, $labels)->toJson(),
152 158
                 $value
153 159
             );
154
-        } catch (LabelException $e) {
160
+        }
161
+        catch (LabelException $e) {
155 162
             throw $e;
156
-        } catch (Exception $e) {
163
+        }
164
+        catch (Exception $e) {
157 165
             $class = get_class($metric);
158 166
 
159 167
             throw new StorageException("Failed to set [{$class}] to `{$value}`: {$e->getMessage()}", 0, $e);
Please login to merge, or discard this patch.