When unexpected state found in waiting, notify the caller func with a correct error message

pull/1139/head
Henry Huang 12 years ago
parent 3a74c469e5
commit 5d410bddc9

@ -151,8 +151,8 @@ func WaitForState(conf *StateChangeConf) (i interface{}, err error) {
}
if !found {
fmt.Errorf("unexpected state '%s', wanted target '%s'", currentState, conf.Target)
return
err := fmt.Errorf("unexpected state '%s', wanted target '%s'", currentState, conf.Target)
return nil, err
}
}

Loading…
Cancel
Save