react-native-bluetooth-escpos-printer-fork 0.0.12 → 0.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -222,7 +222,11 @@ public class RNBluetoothManagerModule extends ReactContextBaseJavaModule
222
222
  if (adapter!=null && adapter.isEnabled()) {
223
223
  BluetoothDevice device = adapter.getRemoteDevice(address);
224
224
  promiseMap.put(PROMISE_CONNECT, promise);
225
- mService.connect(device);
225
+ try {
226
+ mService.connect(device);
227
+ } catch (Exception exception) {
228
+ promise.reject("Failed to connect via BluetoothService", exception);
229
+ }
226
230
  } else {
227
231
  promise.reject("BT NOT ENABLED");
228
232
  }
@@ -349,7 +353,11 @@ public class RNBluetoothManagerModule extends ReactContextBaseJavaModule
349
353
  BluetoothDevice device = adapter
350
354
  .getRemoteDevice(address);
351
355
  // Attempt to connect to the device
352
- mService.connect(device);
356
+ try {
357
+ mService.connect(device);
358
+ } catch (Exception exception) {
359
+ exception.printStackTrace();
360
+ }
353
361
  }
354
362
  }
355
363
  break;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-bluetooth-escpos-printer-fork",
3
- "version": "0.0.12",
3
+ "version": "0.0.13",
4
4
  "description": "React-Native plugin for the bluetooth ESC/POS printers.",
5
5
  "main": "index.js",
6
6
  "scripts": {