Browse Source

Export the error field in ErrStorage, so we can 'throw' it outside the package. (#4954)

Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
pull/4962/head
Tom Wilkie 6 years ago committed by GitHub
parent
commit
e1d9bf77f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      promql/engine.go

4
promql/engine.go

@ -74,7 +74,7 @@ type (
ErrTooManySamples string
// ErrStorage is returned if an error was encountered in the storage layer
// during query handling.
ErrStorage struct{ error }
ErrStorage struct{ Err error }
)
func (e ErrQueryTimeout) Error() string {
@ -87,7 +87,7 @@ func (e ErrTooManySamples) Error() string {
return fmt.Sprintf("query processing would load too many samples into memory in %s", string(e))
}
func (e ErrStorage) Error() string {
return e.error.Error()
return e.Err.Error()
}
// A Query is derived from an a raw query string and can be run against an engine

Loading…
Cancel
Save