File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
react-native-mcu-manager/android/src/main/java/uk/co/playerdata/reactnativemcumanager Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -98,7 +98,11 @@ class DeviceUpgrade(
98
98
dfuManager.setMode(upgradeMode)
99
99
dfuManager.start(images, settings)
100
100
} catch (e1: Exception ) {
101
- return
101
+ e1.printStackTrace()
102
+ disconnectDevice()
103
+ withSafePromise { promise ->
104
+ promise.reject(ReactNativeMcuMgrException .fromMcuMgrException(e1))
105
+ }
102
106
}
103
107
}
104
108
} catch (e: IOException ) {
@@ -108,7 +112,6 @@ class DeviceUpgrade(
108
112
} catch (e: McuMgrException ) {
109
113
e.printStackTrace()
110
114
disconnectDevice()
111
- Log .v(this .TAG , " mcu exception" )
112
115
withSafePromise { promise ->
113
116
promise.reject(ReactNativeMcuMgrException .fromMcuMgrException(e))
114
117
}
You can’t perform that action at this time.
0 commit comments