@@ -74,7 +74,7 @@ |
||
74 | 74 | public function unregister(Metric $metric): self |
75 | 75 | { |
76 | 76 | $this->collector($metric) |
77 | - ->forget($metric::class); |
|
77 | + ->forget($metric::class); |
|
78 | 78 | |
79 | 79 | return $this; |
80 | 80 | } |
@@ -75,9 +75,11 @@ discard block |
||
75 | 75 | } |
76 | 76 | |
77 | 77 | return $builder->samples(); |
78 | - } catch (LabelException $e) { |
|
78 | + } |
|
79 | + catch (LabelException $e) { |
|
79 | 80 | throw $e; |
80 | - } catch (Exception $e) { |
|
81 | + } |
|
82 | + catch (Exception $e) { |
|
81 | 83 | $class = $metric::class; |
82 | 84 | |
83 | 85 | throw new StorageException("Failed to collect the samples of [{$class}]: {$e->getMessage()}", 0, $e); |
@@ -95,9 +97,11 @@ discard block |
||
95 | 97 | $this->labeled($metric, $labels)->toJson(), |
96 | 98 | $value |
97 | 99 | ); |
98 | - } catch (LabelException $e) { |
|
100 | + } |
|
101 | + catch (LabelException $e) { |
|
99 | 102 | throw $e; |
100 | - } catch (Exception $e) { |
|
103 | + } |
|
104 | + catch (Exception $e) { |
|
101 | 105 | $class = $metric::class; |
102 | 106 | |
103 | 107 | throw new StorageException("Failed to increment [{$class}] by `{$value}`: {$e->getMessage()}", 0, $e); |
@@ -115,9 +119,11 @@ discard block |
||
115 | 119 | $this->labeled($metric, $labels)->toJson(), |
116 | 120 | $value |
117 | 121 | ); |
118 | - } catch (LabelException $e) { |
|
122 | + } |
|
123 | + catch (LabelException $e) { |
|
119 | 124 | throw $e; |
120 | - } catch (Exception $e) { |
|
125 | + } |
|
126 | + catch (Exception $e) { |
|
121 | 127 | $class = $metric::class; |
122 | 128 | |
123 | 129 | throw new StorageException("Failed to decrement [{$class}] by `{$value}`: {$e->getMessage()}", 0, $e); |
@@ -136,9 +142,11 @@ discard block |
||
136 | 142 | $this->labeled($metric, $labels), |
137 | 143 | $value |
138 | 144 | ); |
139 | - } catch (LabelException $e) { |
|
145 | + } |
|
146 | + catch (LabelException $e) { |
|
140 | 147 | throw $e; |
141 | - } catch (Exception $e) { |
|
148 | + } |
|
149 | + catch (Exception $e) { |
|
142 | 150 | $class = $metric::class; |
143 | 151 | |
144 | 152 | throw new StorageException("Failed to observe [{$class}] with `{$value}`: {$e->getMessage()}", 0, $e); |
@@ -156,9 +164,11 @@ discard block |
||
156 | 164 | $this->labeled($metric, $labels)->toJson(), |
157 | 165 | $value |
158 | 166 | ); |
159 | - } catch (LabelException $e) { |
|
167 | + } |
|
168 | + catch (LabelException $e) { |
|
160 | 169 | throw $e; |
161 | - } catch (Exception $e) { |
|
170 | + } |
|
171 | + catch (Exception $e) { |
|
162 | 172 | $class = $metric::class; |
163 | 173 | |
164 | 174 | throw new StorageException("Failed to set [{$class}] to `{$value}`: {$e->getMessage()}", 0, $e); |