Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CrashReporter improvement : IssueReporter ? #2777

Merged
merged 8 commits into from
Jul 10, 2017
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
package org.terasology.rendering.nui.layers.ingame;

import org.terasology.assets.ResourceUrn;
import org.terasology.crashreporter.CrashReporter;
import org.terasology.engine.LoggingContext;
import org.terasology.registry.In;
import org.terasology.rendering.nui.CoreScreenLayer;
import org.terasology.rendering.nui.WidgetUtil;
Expand All @@ -36,6 +38,7 @@ public class DevToolsMenuScreen extends CoreScreenLayer {

@Override
public void initialise() {
WidgetUtil.trySubscribe(this, "crashReporter", widget -> CrashReporter.report(new Throwable("Report an error."), LoggingContext.getLoggingPath(), false));
WidgetUtil.trySubscribe(this, "nuiEditor", button -> nuiEditorSystem.toggleEditor());
WidgetUtil.trySubscribe(this, "nuiSkinEditor", button -> nuiSkinEditorSystem.toggleEditor());
WidgetUtil.trySubscribe(this, "btEditor", button -> getManager().toggleScreen("engine:behaviorEditorScreen"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
*/
package org.terasology.rendering.nui.layers.ingame;

import org.terasology.crashreporter.CrashReporter;
import org.terasology.engine.GameEngine;
import org.terasology.engine.LoggingContext;
import org.terasology.engine.modes.StateMainMenu;
import org.terasology.registry.CoreRegistry;
import org.terasology.rendering.nui.CoreScreenLayer;
Expand All @@ -33,7 +31,6 @@ public void initialise() {
WidgetUtil.trySubscribe(this, "settings", widget -> getManager().pushScreen("settingsMenuScreen"));
WidgetUtil.trySubscribe(this, "mainMenu", widget -> CoreRegistry.get(GameEngine.class).changeState(new StateMainMenu()));
WidgetUtil.trySubscribe(this, "exit", widget -> CoreRegistry.get(GameEngine.class).shutdown());
WidgetUtil.trySubscribe(this, "crashReporter", widget -> CrashReporter.report(new Throwable("Report an error."), LoggingContext.getLoggingPath()));
WidgetUtil.trySubscribe(this, "devTools", widget -> getManager().pushScreen("devToolsMenuScreen"));
}
}
Copy link
Member

@rzats rzats Feb 13, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Cervator I'd keep the button in the in-game menu. It's fairly well-hidden anyways.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I'm in no rush to move stuff around. More curious what we should be aiming for :-)

Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public void initialise() {
WidgetUtil.trySubscribe(this, "settings", button -> triggerForwardAnimation(SettingsMenuScreen.ASSET_URI));
WidgetUtil.trySubscribe(this, "credits", button -> triggerForwardAnimation(CreditsScreen.ASSET_URI));
WidgetUtil.trySubscribe(this, "exit", button -> engine.shutdown());
WidgetUtil.trySubscribe(this, "crashReporter", widget -> CrashReporter.report(new Throwable("Report an error."), LoggingContext.getLoggingPath()));
WidgetUtil.trySubscribe(this, "crashReporter", widget -> CrashReporter.report(new Throwable("Report a error."), LoggingContext.getLoggingPath(), false));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe "Report an error" is more correct in this case than "Report a error" - English is weird that way. You can generally go with an if the next word starts with a vovel and otherwise a but there are exceptions ...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, I'm just thinking about deleting all the text "Report a error" or changing it, because there is actually no error in issue reporter.

}

@Override
Expand Down
2 changes: 1 addition & 1 deletion engine/src/main/resources/assets/i18n/menu_en.lang
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"connecting-to": "Connecting to",
"connection-failed": "Connection Failed!",
"could-not-connect-to-server": "Could not connect to server",
"crash-reporter": "Crash Reporter",
"crash-reporter": "Issue Reporter",
"credits": "Credits",
"create-game": "Create",
"create-game-title": "Create Game",
Expand Down
17 changes: 0 additions & 17 deletions engine/src/main/resources/assets/ui/ingame/pauseMenu.ui
Original file line number Diff line number Diff line change
Expand Up @@ -68,23 +68,6 @@
"offset": 8
}
}
},
{
"type": "UIButton",
"id": "crashReporter",
"text": "${engine:menu#crash-reporter}",
"layoutInfo": {
"use-content-width": true,
"use-content-height": true,
"position-bottom": {
"offset": 8
},
"position-right": {
"offset": 8,
"target": "LEFT",
"widget": "devTools"
}
}
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@
}
},
"contents": [
{
"type": "UIButton",
"id": "crashReporter",
"text": "${engine:menu#crash-reporter}"
},
{
"type": "UIButton",
"id": "nuiEditor",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ private static void reportException(Throwable throwable) {
Path logPath = LoggingContext.getLoggingPath();

if (!GraphicsEnvironment.isHeadless() && crashReportEnabled) {
CrashReporter.report(throwable, logPath);
CrashReporter.report(throwable, logPath, true);
} else {
throwable.printStackTrace();
System.err.println("For more details, see the log files in " + logPath.toAbsolutePath().normalize());
Expand Down