mirror of
https://github.com/HighCapable/YukiHookAPI.git
synced 2025-09-04 01:35:17 +08:00
style: rename toStackTrack to dumpToString
This commit is contained in:
@@ -34,7 +34,7 @@ import android.util.Log
|
||||
import com.highcapable.yukihookapi.YukiHookAPI
|
||||
import com.highcapable.yukihookapi.hook.core.api.helper.YukiHookHelper
|
||||
import com.highcapable.yukihookapi.hook.factory.current
|
||||
import com.highcapable.yukihookapi.hook.utils.factory.toStackTrace
|
||||
import com.highcapable.yukihookapi.hook.utils.factory.dumpToString
|
||||
import com.highcapable.yukihookapi.hook.xposed.bridge.YukiXposedModule
|
||||
import com.highcapable.yukihookapi.hook.xposed.parasitic.AppParasitics
|
||||
import java.io.File
|
||||
@@ -175,7 +175,7 @@ object YukiHookLogger {
|
||||
content += "${it.head}$it\n"
|
||||
it.throwable?.also { e ->
|
||||
content += "${it.head}Dump stack trace for \"${e.current().name}\":\n"
|
||||
content += e.toStackTrace()
|
||||
content += e.dumpToString()
|
||||
}
|
||||
}
|
||||
return content
|
||||
|
@@ -33,7 +33,7 @@ import java.io.ByteArrayOutputStream
|
||||
import java.io.PrintStream
|
||||
|
||||
/**
|
||||
* 获取完整的异常堆栈内容
|
||||
* 写出异常堆栈到字符串
|
||||
* @return [String]
|
||||
*/
|
||||
internal fun Throwable.toStackTrace() = ByteArrayOutputStream().also { printStackTrace(PrintStream(it)) }.toString()
|
||||
internal fun Throwable.dumpToString() = ByteArrayOutputStream().also { printStackTrace(PrintStream(it)) }.toString()
|
Reference in New Issue
Block a user