Better error messages.

Update rawread to use the new endpoint interface.
This commit is contained in:
Sebastian Zagrodzki
2017-04-29 00:41:26 +02:00
parent 1fd4e7f4c4
commit 80f3c60b2b
4 changed files with 21 additions and 6 deletions

View File

@@ -93,7 +93,7 @@ func (i *Interface) openEndpoint(epNum int) (*endpoint, error) {
}
}
if !found {
return nil, fmt.Errorf("%s does not have endpoint number %d. Available endpoints: %v", epNum, i.Setting.Endpoints)
return nil, fmt.Errorf("%s does not have endpoint number %d. Available endpoints: %v", i, epNum, i.Setting.Endpoints)
}
return &endpoint{
InterfaceSetting: i.Setting,