| @@ -66,7 +66,8 @@ discard block | ||
| 66 | 66 | default: | 
| 67 | 67 | return $this->samples($metric, $items); | 
| 68 | 68 | } | 
| 69 | -        } catch (Exception $e) { | |
| 69 | + } | |
| 70 | +        catch (Exception $e) { | |
| 70 | 71 | $class = get_class($metric); | 
| 71 | 72 | |
| 72 | 73 |              throw new StorageException("Failed to collect the samples of [{$class}]: {$e->getMessage()}", 0, $e); | 
| @@ -85,9 +86,11 @@ discard block | ||
| 85 | 86 | $this->labeled($metric, $labels)->toJson(), | 
| 86 | 87 | $value | 
| 87 | 88 | ); | 
| 88 | -        } catch (LabelException $e) { | |
| 89 | + } | |
| 90 | +        catch (LabelException $e) { | |
| 89 | 91 | throw $e; | 
| 90 | -        } catch (Exception $e) { | |
| 92 | + } | |
| 93 | +        catch (Exception $e) { | |
| 91 | 94 | $class = get_class($metric); | 
| 92 | 95 | |
| 93 | 96 |              throw new StorageException("Failed to increment [{$class}] by `{$value}`: {$e->getMessage()}", 0, $e); | 
| @@ -105,9 +108,11 @@ discard block | ||
| 105 | 108 | $this->labeled($metric, $labels)->toJson(), | 
| 106 | 109 | $value | 
| 107 | 110 | ); | 
| 108 | -        } catch (LabelException $e) { | |
| 111 | + } | |
| 112 | +        catch (LabelException $e) { | |
| 109 | 113 | throw $e; | 
| 110 | -        } catch (Exception $e) { | |
| 114 | + } | |
| 115 | +        catch (Exception $e) { | |
| 111 | 116 | $class = get_class($metric); | 
| 112 | 117 | |
| 113 | 118 |              throw new StorageException("Failed to decrement [{$class}] by `{$value}`: {$e->getMessage()}", 0, $e); | 
| @@ -135,7 +140,8 @@ discard block | ||
| 135 | 140 | $this->repository->set($key, $field, $identifier, false); | 
| 136 | 141 | $this->repository->push($identifier, $value); | 
| 137 | 142 | } | 
| 138 | -        } catch (Exception $e) { | |
| 143 | + } | |
| 144 | +        catch (Exception $e) { | |
| 139 | 145 | $class = get_class($metric); | 
| 140 | 146 | |
| 141 | 147 |              throw new StorageException("Failed to observe [{$class}] with `{$value}`: {$e->getMessage()}", 0, $e); | 
| @@ -153,9 +159,11 @@ discard block | ||
| 153 | 159 | $this->labeled($metric, $labels)->toJson(), | 
| 154 | 160 | $value | 
| 155 | 161 | ); | 
| 156 | -        } catch (LabelException $e) { | |
| 162 | + } | |
| 163 | +        catch (LabelException $e) { | |
| 157 | 164 | throw $e; | 
| 158 | -        } catch (Exception $e) { | |
| 165 | + } | |
| 166 | +        catch (Exception $e) { | |
| 159 | 167 | $class = get_class($metric); | 
| 160 | 168 | |
| 161 | 169 |              throw new StorageException("Failed to set [{$class}] to `{$value}`: {$e->getMessage()}", 0, $e); |