mirror of
https://github.com/prometheus/prometheus.git
synced 2025-02-21 03:16:00 -08:00
Merge pull request #13039 from zenador/make-anno-err-visible
Make it possible to unwrap annotation error
This commit is contained in:
commit
e9b94515ca
|
@ -122,6 +122,10 @@ func (e annoErr) Error() string {
|
||||||
return fmt.Sprintf("%s (%s)", e.Err, e.PositionRange.StartPosInput(e.Query, 0))
|
return fmt.Sprintf("%s (%s)", e.Err, e.PositionRange.StartPosInput(e.Query, 0))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (e annoErr) Unwrap() error {
|
||||||
|
return e.Err
|
||||||
|
}
|
||||||
|
|
||||||
// NewInvalidQuantileWarning is used when the user specifies an invalid quantile
|
// NewInvalidQuantileWarning is used when the user specifies an invalid quantile
|
||||||
// value, i.e. a float that is outside the range [0, 1] or NaN.
|
// value, i.e. a float that is outside the range [0, 1] or NaN.
|
||||||
func NewInvalidQuantileWarning(q float64, pos posrange.PositionRange) annoErr {
|
func NewInvalidQuantileWarning(q float64, pos posrange.PositionRange) annoErr {
|
||||||
|
|
Loading…
Reference in a new issue