From 67574e7276126741c6cf182c21a5d17ba0fb00e9 Mon Sep 17 00:00:00 2001 From: Matthias Fulz Date: Sat, 2 Jul 2022 15:50:07 +0200 Subject: [PATCH] Using error handler --- qmk-cmd.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 }