The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
grafana/pkg/kindsys/errors.go

35 lines
819 B

package kindsys
import "errors"
// TODO consider rewriting with https://github.com/cockroachdb/errors
var (
// ErrValueNotExist indicates that a necessary CUE value did not exist.
ErrValueNotExist = errors.New("cue value does not exist")
// ErrValueNotAKind indicates that a provided CUE value is not any variety of
// Interface. This is almost always an end-user error - they oops'd and provided the
// wrong path, file, etc.
ErrValueNotAKind = errors.New("not a kind")
)
func ewrap(actual, is error) error {
return &errPassthrough{
actual: actual,
is: is,
}
}
type errPassthrough struct {
actual error
is error
}
func (e *errPassthrough) Is(err error) bool {
return errors.Is(err, e.actual) || errors.Is(err, e.is)
}
func (e *errPassthrough) Error() string {
return e.actual.Error()
}