#1896 fatal when no needed update task

This commit is contained in:
Unknwon 2015-11-04 21:57:10 -05:00
parent 9372eedf2e
commit f255b1e86d
10 changed files with 66 additions and 46 deletions

View file

@ -275,6 +275,19 @@ func (err ErrInvalidCloneAddr) Error() string {
err.IsURLError, err.IsInvalidPath, err.IsPermissionDenied)
}
type ErrUpdateTaskNotExist struct {
UUID string
}
func IsErrUpdateTaskNotExist(err error) bool {
_, ok := err.(ErrUpdateTaskNotExist)
return ok
}
func (err ErrUpdateTaskNotExist) Error() string {
return fmt.Sprintf("update task does not exist [uuid: %s]", err.UUID)
}
// __ __ ___. .__ __
// / \ / \ ____\_ |__ | |__ ____ ____ | | __
// \ \/\/ // __ \| __ \| | \ / _ \ / _ \| |/ /