调试窗

修复NumberFormatException异常
This commit is contained in:
xuxinchao
2022-06-01 11:54:42 +08:00
parent f3304a313b
commit f003f0fc5a

View File

@@ -1073,13 +1073,19 @@ class DebugSettingView @JvmOverloads constructor(
if (logTimeStr.isNullOrEmpty()) {
logTimeStr = "10"
}
val logCatchTime = logTimeStr.toInt()
if (logCatchTime > 60) {
tbLogCatch.isChecked = false
TipToast.shortTip("最长抓取时间为60分钟")
return@setOnCheckedChangeListener
try{
val logCatchTime = logTimeStr.toInt()
if (logCatchTime > 60) {
tbLogCatch.isChecked = false
TipToast.shortTip("最长抓取时间为60分钟")
return@setOnCheckedChangeListener
}
CallerDevaToolsManager.startCatchLog(logCatchTime)
}catch (e: Exception){
ToastUtils.showLong("输入格式错误请重新输入正确时间数字最长抓取时间为60分钟")
etLogCatch.setText("")
}
CallerDevaToolsManager.startCatchLog(logCatchTime)
} else {
CallerDevaToolsManager.stopCatchLog()
}