1
0
mirror of https://github.com/go-task/task.git synced 2024-12-12 10:45:49 +02:00
task/errors.go

39 lines
745 B
Go
Raw Normal View History

2017-03-03 01:48:00 +02:00
package task
import (
"fmt"
)
type taskFileNotFound struct {
taskFile string
}
func (err taskFileNotFound) Error() string {
return fmt.Sprintf(`task: No task file found (is it named "%s"?)`, err.taskFile)
}
2017-03-03 01:48:00 +02:00
type taskNotFoundError struct {
taskName string
}
func (err *taskNotFoundError) Error() string {
return fmt.Sprintf(`task: Task "%s" not found`, err.taskName)
2017-03-03 01:48:00 +02:00
}
type taskRunError struct {
taskName string
err error
}
func (err *taskRunError) Error() string {
return fmt.Sprintf(`task: Failed to run task "%s": %v`, err.taskName, err.err)
2017-03-03 01:48:00 +02:00
}
type cyclicDepError struct {
taskName string
}
func (err *cyclicDepError) Error() string {
return fmt.Sprintf(`task: Cyclic dependency of task "%s" detected`, err.taskName)
2017-03-03 01:48:00 +02:00
}