mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-22 03:53:49 +00:00
alert on stack trace
This commit is contained in:
@@ -173,7 +173,14 @@ export class GameRunner {
|
||||
}
|
||||
this.isProcessingTurn = true
|
||||
this.gs.addExecution(...this.executor.createExecs(this.turns[this.currTurn]))
|
||||
this.gs.executeNextTick()
|
||||
try {
|
||||
this.gs.executeNextTick()
|
||||
throw Error("test")
|
||||
} catch (error) {
|
||||
const errorText = `Error: ${error.message}\nStack: ${error.stack}`;
|
||||
alert("Game crashed! Error info copied to clipboard. Please paste this in your bug report in Discord.");
|
||||
navigator.clipboard.writeText(errorText);
|
||||
}
|
||||
this.renderer.tick()
|
||||
this.currTurn++
|
||||
this.isProcessingTurn = false
|
||||
|
||||
Reference in New Issue
Block a user