Skip to content

Commit 5604692

Browse files
committed
Improve stacktrace printer
1 parent 4386509 commit 5604692

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/main/java/com/tang/intellij/lua/errorreporting/error-report.kt

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,7 @@ import org.eclipse.egit.github.core.service.IssueService
4848
import org.jetbrains.annotations.NonNls
4949
import org.jetbrains.annotations.PropertyKey
5050
import java.awt.Component
51-
import java.io.FileOutputStream
52-
import java.io.IOException
53-
import java.io.ObjectInputStream
54-
import java.io.ObjectOutputStream
51+
import java.io.*
5552
import java.net.URL
5653
import java.util.*
5754
import javax.crypto.Cipher
@@ -228,7 +225,9 @@ class GitHubErrorBean(
228225
init {
229226
val trace = throwable.stackTrace
230227
exceptionHash = Arrays.hashCode(trace).toString()
231-
stackTrace = trace.joinToString(System.lineSeparator())
228+
val sw = StringWriter()
229+
throwable.printStackTrace(PrintWriter(sw))
230+
stackTrace = sw.toString()
232231
}
233232
var pluginName = ""
234233
var pluginVersion = ""

0 commit comments

Comments
 (0)