Browse Source

1.添加try catch处理

20241218TB223FC(测试jar包)
wangwanlei 7 months ago
parent
commit
44a8b064eb

+ 9
- 9
app/src/main/java/com/xhly/manageapp/workmanager/TimingWorker.kt View File

54
                 val fromJson = spUtils.getFromJson(Const.USERINFO, UserBean().javaClass)
54
                 val fromJson = spUtils.getFromJson(Const.USERINFO, UserBean().javaClass)
55
                 userBean = fromJson as UserBean?
55
                 userBean = fromJson as UserBean?
56
             } catch (e: Exception) {
56
             } catch (e: Exception) {
57
-
57
+                LogShow("问题是$e")
58
             }
58
             }
59
-            val appInfo = getAppInfo()
60
-            if (appInfo.size > 0) {
61
-               try {
62
-                   logService.postLogAppStartAdd(appInfo)
63
-               }catch (e:Exception){
64
-
65
-               }
59
+            try {
60
+                val appInfo = getAppInfo()
61
+                if (appInfo.size > 0) {
62
+                    logService.postLogAppStartAdd(appInfo)
63
+                }
64
+            }catch (e:Exception){
65
+                LogShow("问题是$e")
66
             }
66
             }
67
             UIEvent(Const.STARTLOCATION).post()
67
             UIEvent(Const.STARTLOCATION).post()
68
             userBean?.let {
68
             userBean?.let {
74
                        UIEvent(Const.ACCOUNTLOGINOUTSUCESS).post()
74
                        UIEvent(Const.ACCOUNTLOGINOUTSUCESS).post()
75
                    }
75
                    }
76
                }catch (e:Exception){
76
                }catch (e:Exception){
77
-
77
+                 LogShow("问题是$e")
78
                }
78
                }
79
             }
79
             }
80
             //校验登录
80
             //校验登录

Loading…
Cancel
Save