Browse Source

1.添加try catch处理

20241218TB223FC(测试jar包)
wangwanlei 7 months ago
parent
commit
44a8b064eb
1 changed files with 9 additions and 9 deletions
  1. 9
    9
      app/src/main/java/com/xhly/manageapp/workmanager/TimingWorker.kt

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

@@ -54,15 +54,15 @@ class TimingWorker(context: Context, workerParams: WorkerParameters) :
54 54
                 val fromJson = spUtils.getFromJson(Const.USERINFO, UserBean().javaClass)
55 55
                 userBean = fromJson as UserBean?
56 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 67
             UIEvent(Const.STARTLOCATION).post()
68 68
             userBean?.let {
@@ -74,7 +74,7 @@ class TimingWorker(context: Context, workerParams: WorkerParameters) :
74 74
                        UIEvent(Const.ACCOUNTLOGINOUTSUCESS).post()
75 75
                    }
76 76
                }catch (e:Exception){
77
-
77
+                 LogShow("问题是$e")
78 78
                }
79 79
             }
80 80
             //校验登录

Loading…
Cancel
Save