1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

improve error message

This commit is contained in:
Victor Vieux 2013-10-30 11:24:50 -07:00 committed by Michael Crosby
parent 5fb6d6e47c
commit 6a9fb81c57

View file

@ -355,6 +355,9 @@ func (runtime *Runtime) Create(config *Config, name string) (*Container, []strin
// Set the enitity in the graph using the default name specified
if _, err := runtime.containerGraph.Set(name, id); err != nil {
if strings.HasSuffix(err.Error(), "name are not unique") {
return nil, nil, fmt.Errorf("Conflict, %s already exists.", name)
}
return nil, nil, err
}