github.com/liamawhite/cli-with-i18n@v6.32.1-0.20171122084555-dede0a5c3448+incompatible/api/cloudcontroller/ccerror/unknown_object_in_list_error.go (about) 1 package ccerror 2 3 import ( 4 "fmt" 5 "reflect" 6 ) 7 8 // UnknownObjectInListError is returned when iterating through a paginated 9 // list. Assuming tests are written for the paginated function, this should be 10 // impossible to get. 11 type UnknownObjectInListError struct { 12 Expected interface{} 13 Unexpected interface{} 14 } 15 16 func (e UnknownObjectInListError) Error() string { 17 return fmt.Sprintf( 18 "Error while processing a paginated list. Expected %s but %s was returned", 19 reflect.TypeOf(e.Expected), 20 reflect.TypeOf(e.Unexpected), 21 ) 22 }