Remove redundant error message

Currently some commands including `kill`, `pause`, `restart`, `rm`,
`rmi`, `stop`, `unpause`, `udpate`, `wait` will print a lot of error
message on client side, with a lot of redundant messages, this commit is
trying to remove the unuseful and redundant information for user.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
This commit is contained in:
Zhang Wei
2016-02-03 14:29:15 +08:00
parent 6f88a3d7d3
commit 894266c1bb
17 changed files with 58 additions and 32 deletions

View File

@@ -20,7 +20,7 @@ func (daemon *Daemon) ContainerStop(name string, seconds int) error {
return err
}
if !container.IsRunning() {
return derr.ErrorCodeStopped
return derr.ErrorCodeStopped.WithArgs(name)
}
if err := daemon.containerStop(container, seconds); err != nil {
return derr.ErrorCodeCantStop.WithArgs(name, err)