MCPcopy Index your code
hub / github.com/1Panel-dev/1Panel / handlerErr

Function handlerErr

agent/utils/controller/manager/common.go:10–18  ·  view source on GitHub ↗
(out string, err error)

Source from the content-addressed store, hash-verified

8)
9
10func handlerErr(out string, err error) error {
11 if err != nil {
12 if out != "" {
13 return errors.New(out)
14 }
15 return err
16 }
17 return nil
18}
19
20func run(name string, args ...string) (string, error) {
21 return cmd.NewCommandMgr(cmd.WithTimeout(10*time.Second), cmd.WithEnv("LANGUAGE=en_US:en")).RunWithStdout(name, args...)

Callers 5

OperateMethod · 0.70
OperateMethod · 0.70
OperateMethod · 0.70
OperateMethod · 0.70
ReloadMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected