add more log

This commit is contained in:
TangBin
2019-02-25 12:08:30 +08:00
parent 8c02f86eec
commit 65d1d72f98
2 changed files with 3 additions and 1 deletions
+1
View File
@@ -755,6 +755,7 @@ func (self *SRegion) CreateInstance(name string, imageId string, instanceType st
} else {
// 包年包月
err = cloudprovider.WaitCreated(10*time.Second, 180*time.Second, func() bool {
log.Debugf("WaitCreated %s", _id)
order, e := self.GetOrder(_id)
if e != nil {
log.Debugf(e.Error())
+2 -1
View File
@@ -125,7 +125,8 @@ func doListPart(doList listFunc, queries map[string]string, result interface{})
func DoGet(doGet getFunc, id string, queries map[string]string, result interface{}) error {
if len(id) == 0 {
return fmt.Errorf(" id should not be empty")
resultType := reflect.Indirect(reflect.ValueOf(result)).Type()
return fmt.Errorf(" Get %s id should not be empty", resultType.Name())
}
ret, err := doGet(id, queries)