client: added java version and charset info to error report (related to #13121)

This commit is contained in:
Oleg Agafonov 2024-12-07 14:54:02 +04:00
parent 8af7a492c8
commit de34a98208

View file

@ -5,6 +5,8 @@ import mage.client.util.AppUtil;
import mage.client.util.GUISizeHelper;
import mage.util.CardUtil;
import java.nio.charset.Charset;
/**
* GUI: error dialog with copyable error message
* // TODO: add game logs and data for game errors (client side info from GameView)
@ -28,7 +30,10 @@ public class ErrorDialog extends MageDialog {
// add additional info
String fullError = "Error type: " + fullTitle + "\n"
+ "\n"
+ "Client version: " + MageFrame.getInstance().getVersion().toString() + "\n"
+ "Java version: " + System.getProperty("java.version") + "\n"
+ "Default charset: " + Charset.defaultCharset() + "\n"
+ "\n"
+ errorText;
this.textError.setText(fullError);
@ -68,7 +73,8 @@ public class ErrorDialog extends MageDialog {
AppUtil.openUrlInSystemBrowser(url);
}
/** This method is called from within the constructor to
/**
* This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.