Merge branch 'dtolnay-timeouterror'

This commit is contained in:
James Nugent 2016-08-22 10:35:04 +02:00
commit a69c62af65
1 changed files with 7 additions and 5 deletions

View File

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