update error message to be more verbose

This commit is contained in:
Sebastian Zagrodzki
2017-04-29 01:37:39 +02:00
parent b39b8d9521
commit 541275d5b9

View File

@@ -353,7 +353,7 @@ func (libusbImpl) getStringDesc(d *libusbDevHandle, index int) (string, error) {
(*C.uchar)(unsafe.Pointer(&buf[0])),
200)
if errno < 0 {
return "", fmt.Errorf("usb: getstr: %s", fromErrNo(errno))
return "", fmt.Errorf("failed to get string descriptor %d: %s", index, fromErrNo(errno))
}
return string(buf[:errno]), nil
}