gstat/errors/baseError.go

14 lines
258 B
Go
Raw Permalink Normal View History

2020-05-01 16:15:50 +02:00
package errors
import "fmt"
// BaseError is a custom error with some extra fields.
2020-05-01 16:15:50 +02:00
type BaseError struct {
Operation string
2020-05-03 16:24:05 +02:00
Message string
2020-05-01 16:15:50 +02:00
}
func (e BaseError) Error() string {
return fmt.Sprintf("%s failed because of: %s", e.Operation, e.Message)
2020-05-03 16:24:05 +02:00
}