|
|
@@ -17,6 +17,8 @@ package command
|
|
|
import (
|
|
|
"fmt"
|
|
|
"os"
|
|
|
+
|
|
|
+ "github.com/coreos/etcd/client"
|
|
|
)
|
|
|
|
|
|
const (
|
|
|
@@ -29,5 +31,8 @@ const (
|
|
|
|
|
|
func handleError(code int, err error) {
|
|
|
fmt.Fprintln(os.Stderr, "Error: ", err)
|
|
|
+ if cerr, ok := err.(*client.ClusterError); ok {
|
|
|
+ fmt.Fprintln(os.Stderr, cerr.Detail())
|
|
|
+ }
|
|
|
os.Exit(code)
|
|
|
}
|