react-native-gizwits-sdk-v5 1.5.3-thirdbluetooth → 1.5.4-thirdbluetooth

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.
@@ -33,11 +33,12 @@ object GizRNCallbackManager {
33
33
  } else {
34
34
  data.success = false
35
35
  result.exceptionOrNull()?.let {
36
- try {
37
- data.error = (it as GizException).errorCode
38
- data.message = (it as GizException).localizedMessage
39
- } catch (e: Exception) {
40
-
36
+ if (it is GizException) {
37
+ data.error = it.errorCode
38
+ data.message = it.localizedMessage ?: it.message ?: ""
39
+ } else {
40
+ // 对于非 GizException 的异常(如 IllegalArgumentException),使用异常的消息
41
+ data.message = it.message ?: it.localizedMessage ?: it.toString()
41
42
  }
42
43
  }
43
44
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-gizwits-sdk-v5",
3
- "version": "1.5.3-thirdbluetooth",
3
+ "version": "1.5.4-thirdbluetooth",
4
4
  "description": "Gizwits",
5
5
  "homepage": "https://github.com/demchenkoalex/react-native-gizwits-sdk-v5#readme",
6
6
  "main": "lib/index.js",