diff --git a/qmk-cmd.go b/qmk-cmd.go index 5b8c2c4..ab6a111 100644 --- a/qmk-cmd.go +++ b/qmk-cmd.go @@ -287,13 +287,13 @@ func setCfg(dev *QEncDevice, cfg QEncCfg, val uint8) (err error) { func sendDataWrapper(dev *QEncDevice, data []byte, cmd QEncCmd, id uint32) (ret []byte, err error) { if err = dev.Open(); err != nil { if QEncInfoHandler != nil { - QEncInfoHandler(err.Error()) + QEncErrHandler(err) } return nil, err } if err = dev.Lock(); err != nil { if QEncInfoHandler != nil { - QEncInfoHandler(err.Error()) + QEncErrHandler(err) } return nil, err }