2017-03-03 01:48:00 +02:00
|
|
|
package task
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
)
|
|
|
|
|
2017-03-07 10:45:14 +02:00
|
|
|
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 {
|
2017-03-03 01:56:37 +02:00
|
|
|
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 {
|
2017-03-03 01:56:37 +02:00
|
|
|
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 {
|
2017-03-03 01:56:37 +02:00
|
|
|
return fmt.Sprintf(`task: Cyclic dependency of task "%s" detected`, err.taskName)
|
2017-03-03 01:48:00 +02:00
|
|
|
}
|
2017-04-01 21:04:52 +02:00
|
|
|
|
|
|
|
type cantWatchNoSourcesError struct {
|
|
|
|
taskName string
|
|
|
|
}
|
|
|
|
|
|
|
|
func (err *cantWatchNoSourcesError) Error() string {
|
|
|
|
return fmt.Sprintf(`task: Can't watch task "%s" because it has no specified sources`, err.taskName)
|
|
|
|
}
|