MCPcopy Index your code
hub / github.com/cloudfoundry/cli / translateErrors

Method translateErrors

command/v7/scale_command.go:75–89  ·  view source on GitHub ↗
(err error)

Source from the content-addressed store, hash-verified

73}
74
75func (cmd ScaleCommand) translateErrors(err error) error {
76 if _, ok := err.(actionerror.StartupTimeoutError); ok {
77 return translatableerror.StartupTimeoutError{
78 AppName: cmd.RequiredArgs.AppName,
79 BinaryName: cmd.Config.BinaryName(),
80 }
81 } else if _, ok := err.(actionerror.AllInstancesCrashedError); ok {
82 return translatableerror.ApplicationUnableToStartError{
83 AppName: cmd.RequiredArgs.AppName,
84 BinaryName: cmd.Config.BinaryName(),
85 }
86 }
87
88 return err
89}
90
91func (cmd ScaleCommand) scaleProcess(appGUID string, username string) (bool, error) {
92 cmd.UI.DisplayTextWithFlavor("Scaling app {{.AppName}} in org {{.OrgName}} / space {{.SpaceName}} as {{.Username}}...", map[string]interface{}{

Callers 1

ExecuteMethod · 0.95

Calls 1

BinaryNameMethod · 0.65

Tested by

no test coverage detected