-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Description
Currently we only log error in the noble-winrt package as noble has a rather bad error handling story (noble/noble#830). The problem is that it only emits a warning if e.g. a peripheral is not found and there is no way for bindings to return an error.
A proper solution would be to add a error argument in the bindings interface and the noble interface to let bindings error bubble up to the user.
Noble.prototype.onDisconnect = function(peripheralUuid, error) {
var peripheral = this._peripherals[peripheralUuid];
if (peripheral) {
peripheral.emit('disconnect', error);
} else {
this.emit('warning', 'unknown peripheral ' + peripheralUuid + ' disconnected!');
}
};Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels