mirror of
https://github.com/KitsunePie/AppErrorsTracking.git
synced 2025-09-04 02:05:16 +08:00
Modify remove "contains", "replace" method's param name statement
This commit is contained in:
@@ -86,7 +86,7 @@ data class AppErrorsInfoBean(
|
|||||||
isNativeCrash = isNativeCrash,
|
isNativeCrash = isNativeCrash,
|
||||||
exceptionClassName = crashInfo?.exceptionClassName ?: "unknown",
|
exceptionClassName = crashInfo?.exceptionClassName ?: "unknown",
|
||||||
exceptionMessage = if (isNativeCrash) crashInfo?.stackTrace.let {
|
exceptionMessage = if (isNativeCrash) crashInfo?.stackTrace.let {
|
||||||
if (it?.contains(other = "Abort message: '") == true)
|
if (it?.contains("Abort message: '") == true)
|
||||||
runCatching { it.split("Abort message: '")[1].split("'")[0] }.getOrNull()
|
runCatching { it.split("Abort message: '")[1].split("'")[0] }.getOrNull()
|
||||||
?: crashInfo?.exceptionMessage ?: "unknown"
|
?: crashInfo?.exceptionMessage ?: "unknown"
|
||||||
else crashInfo?.exceptionMessage ?: "unknown"
|
else crashInfo?.exceptionMessage ?: "unknown"
|
||||||
|
@@ -167,7 +167,7 @@ class LoggerActivity : BaseActivity<ActivitiyLoggerBinding>() {
|
|||||||
* 格式化消息字符串样式
|
* 格式化消息字符串样式
|
||||||
* @return [String]
|
* @return [String]
|
||||||
*/
|
*/
|
||||||
private fun String.format() = replace(oldValue = "--", newValue = "\n--")
|
private fun String.format() = replace("--", "\n--")
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取完整的异常堆栈内容
|
* 获取完整的异常堆栈内容
|
||||||
|
@@ -193,7 +193,7 @@ class AppErrorsRecordActivity : BaseActivity<ActivityAppErrorsRecordBinding>() {
|
|||||||
* @return [String]
|
* @return [String]
|
||||||
*/
|
*/
|
||||||
private fun String.simpleThwName() =
|
private fun String.simpleThwName() =
|
||||||
let { text -> if (text.contains(other = ".")) text.split(".").let { e -> e[e.lastIndex] } else text }
|
let { text -> if (text.contains(".")) text.split(".").let { e -> e[e.lastIndex] } else text }
|
||||||
|
|
||||||
override fun onCreateContextMenu(menu: ContextMenu?, v: View?, menuInfo: ContextMenu.ContextMenuInfo?) {
|
override fun onCreateContextMenu(menu: ContextMenu?, v: View?, menuInfo: ContextMenu.ContextMenuInfo?) {
|
||||||
menuInflater.inflate(R.menu.menu_list_detail_action, menu)
|
menuInflater.inflate(R.menu.menu_list_detail_action, menu)
|
||||||
|
Reference in New Issue
Block a user