mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-26 13:27:22 -04:00
Crash screen throws exception on a separate thread so the GCP logs record it
This commit is contained in:
parent
2898a64606
commit
d1b4fe6d1a
@ -10,6 +10,7 @@ import com.unciv.models.ruleset.RulesetCache
|
||||
import com.unciv.ui.utils.*
|
||||
import java.io.PrintWriter
|
||||
import java.io.StringWriter
|
||||
import kotlin.concurrent.thread
|
||||
|
||||
/** Screen to crash to when an otherwise unhandled exception or error is thrown. */
|
||||
class CrashScreen(val exception: Throwable): BaseScreen() {
|
||||
@ -38,6 +39,7 @@ class CrashScreen(val exception: Throwable): BaseScreen() {
|
||||
|
||||
init {
|
||||
println(text) // Also print to system terminal.
|
||||
thread { throw exception } // this is so the GPC logs catch the exception
|
||||
stage.addActor(makeLayoutTable())
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user