Add error handling to connect call
This commit is contained in:
parent
d5f83f4643
commit
d5c893b9d1
@ -151,7 +151,10 @@ func connectByName() (*Device, error) {
|
|||||||
return nil, ErrNoDevices
|
return nil, ErrNoDevices
|
||||||
}
|
}
|
||||||
// Connect to device
|
// Connect to device
|
||||||
out.device.Connect()
|
err = out.device.Connect()
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
// Resolve characteristics
|
// Resolve characteristics
|
||||||
err = out.resolveChars()
|
err = out.resolveChars()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Reference in New Issue
Block a user