transdep/errors/timeout.go
2018-01-23 21:25:00 +01:00

19 lines
390 B
Go

package errors
import "fmt"
type TimeoutError struct {
operation string
requestTopic string
}
func NewTimeoutError(operation, topic string) *TimeoutError {
te := new(TimeoutError)
te.operation = operation
te.requestTopic = topic
return te
}
func (te *TimeoutError) Error() string {
return fmt.Sprintf("timeout while performing \"%s\" on \"%s\"", te.operation, te.requestTopic)
}