evothings / cordova-ble

Bluetooth Low Energy plugin for Cordova
http://www.evothings.com/
Apache License 2.0
242 stars 103 forks source link

Encapsulate errors across devices #63

Open thegecko opened 9 years ago

thegecko commented 9 years ago

Currently any underlying errors in the native stacks are exposed directly in JavaScript. This means that string errors are seen on iOS and integer errors on android.

This doesn't encapsulate/abstract the platforms entirely which means developers cannot have a single code base when error handling.

Perhaps android ints can be converted into the iOS strings, or both be hidden behind an evothings-specific error code list.