Fix printing errors from failed binary runs
I had the kublet die on startup and the only error was "0x401da0" Which I assume is an address of the err.Error function. The other way to fix this, I think, would be to use err.Error(), however that could cause fmt.Fprintf() problems, debuging on the error message people used. Now I get a nice clean error I can understand: "cAdvisor.New() err = mountpoint for cpu not found"
This commit is contained in:
parent
c19437395b
commit
8e7d14196f
@ -42,7 +42,7 @@ func main() {
|
||||
verflag.PrintAndExitIfRequested()
|
||||
|
||||
if err := s.Run(pflag.CommandLine.Args()); err != nil {
|
||||
fmt.Fprint(os.Stderr, err.Error)
|
||||
fmt.Fprint(os.Stderr, "%v\n", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
|
@ -49,7 +49,7 @@ func main() {
|
||||
verflag.PrintAndExitIfRequested()
|
||||
|
||||
if err := s.Run(pflag.CommandLine.Args()); err != nil {
|
||||
fmt.Fprint(os.Stderr, err.Error)
|
||||
fmt.Fprint(os.Stderr, "%v\n", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ func main() {
|
||||
verflag.PrintAndExitIfRequested()
|
||||
|
||||
if err := s.Run(pflag.CommandLine.Args()); err != nil {
|
||||
fmt.Fprint(os.Stderr, err.Error)
|
||||
fmt.Fprint(os.Stderr, "%v\n", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ func main() {
|
||||
verflag.PrintAndExitIfRequested()
|
||||
|
||||
if err := s.Run(pflag.CommandLine.Args()); err != nil {
|
||||
fmt.Fprint(os.Stderr, err.Error)
|
||||
fmt.Fprint(os.Stderr, "%v\n", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user