Change error message return structure

pull/8373/head
James Nugent 10 years ago
parent 9d3f40a513
commit 0a5acaa0d8

@ -44,10 +44,11 @@ type TimeoutError struct {
}
func (e *TimeoutError) Error() string {
msg := fmt.Sprintf("timeout while waiting for state to become '%s'",
strings.Join(e.ExpectedState, ", "))
if e.LastError != nil {
msg += fmt.Sprintf(". last error: %s", e.LastError)
return fmt.Sprintf("timeout while waiting for state to become '%s': %s",
strings.Join(e.ExpectedState, ", "), e.LastError)
}
return msg
return fmt.Sprintf("timeout while waiting for state to become '%s'",
strings.Join(e.ExpectedState, ", "))
}

Loading…
Cancel
Save