-
Notifications
You must be signed in to change notification settings - Fork 110
Catch invalid JSON from Redis and throw an error #174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
73f0449
e1f9fa3
31e5b8b
fe9fd7b
98c4292
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| <?php | ||
|
|
||
| namespace Prometheus\Exception; | ||
|
|
||
| use Exception; | ||
|
|
||
| /** | ||
| * Exception thrown if a metric can't be found in the CollectorRegistry. | ||
| */ | ||
| class MetricJsonException extends Exception | ||
| { | ||
|
|
||
| private $metricName; | ||
|
Check failure on line 13 in src/Prometheus/Exception/MetricJsonException.php
|
||
| public function __construct($message = "", $code = 0, Exception $previous = null, ?string $metricName = null) | ||
|
Check failure on line 14 in src/Prometheus/Exception/MetricJsonException.php
|
||
| { | ||
| parent::__construct($message, $code, $previous); | ||
| $this->metricName = $metricMetaData; | ||
|
Check failure on line 17 in src/Prometheus/Exception/MetricJsonException.php
|
||
| } | ||
|
|
||
| public function getMetricName(): ?string | ||
| { | ||
| return $this->metricName; | ||
| } | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.