Skip to content
Snippets Groups Projects
Commit e9120908 authored by Erik Diers's avatar Erik Diers
Browse files

Fixing bug report bug

parent 94485957
Branches
Tags
No related merge requests found
No preview for this file type
......@@ -56,11 +56,20 @@ public class ReportABugWindow extends SimpleFrame{
super.addCenter(includeLogData);
super.addCenterNoLeftalignment(new ButtonPanel("Submit", e -> {
if (JOptionPane.showConfirmDialog(null, "Information of data processing:\nGiven and said data will be forwared to the developers or maintainers of this application!") == JOptionPane.OK_OPTION) {
if (JOptionPane.showConfirmDialog(null, "Information of data processing:\nGiven and said data will be forwared to the email sfb1280bug@rub.de!") == JOptionPane.OK_OPTION) {
JSONObject dataJson = createJSON();
if (includeLogData.getOutput()) {
dataJson.put("log", Debug.allLogFile.toString());
String data = Debug.allLogFile.toString();
if (data.length() > 45000000) {
data = "...\n" + data.substring(data.length() - 45000000);
}
dataJson.put("log", data);
/*StringBuilder b = new StringBuilder();
for(int i = 0; i < 10000; i++)
b.append("VERY LONG MSG. ");
dataJson.put("log", b.toString());*/
}
// System.out.println("JSON: " + dataJson.toString());
......@@ -120,6 +129,7 @@ public class ReportABugWindow extends SimpleFrame{
if (c == 200) {
JOptionPane.showMessageDialog(null, "Thank you for your feedback!\nYour report will be handled soon.");
} else {
System.out.println("CODE: " + c);
JOptionPane.showMessageDialog(null, "The report could not be delivered!\nThis may be due to technical problems. If possible try later or contact the developer of this application!");
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment