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

Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
This commit is contained in:
Tom Wilkie 2018-12-04 16:49:21 +00:00 committed by GitHub
parent 7fc501d983
commit e1d9bf77f1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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