Skip to content

Commit

Permalink
Improved hypervisor StopApp error message.
Browse files Browse the repository at this point in the history
  • Loading branch information
Evan Lin committed Nov 11, 2019
1 parent a09012e commit 75457b7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/visor/rpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,11 @@ func (r *RPC) StartApp(name *string, _ *struct{}) error {

// StopApp stops App with provided name.
func (r *RPC) StopApp(name *string, _ *struct{}) error {
return r.node.StopApp(*name)
err := r.node.StopApp(*name)
if err == ErrUnknownApp {
err = errors.New("app is either non-existent, or is already stopped")
}
return err
}

// SetAutoStartIn is input for SetAutoStart.
Expand Down

0 comments on commit 75457b7

Please sign in to comment.