Skip to content

Commit 47ffabb

Browse files
committed
Minor error message changes
1 parent e1add94 commit 47ffabb

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

src/main/java/airsquared/blobsaver/app/TSS.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,9 @@ private void saveBlobsTSSSaver(StringBuilder responseBuilder) {
418418

419419
@SuppressWarnings("rawtypes") Map responseBody = new Gson().fromJson(response.body(), Map.class);
420420

421-
if (responseBody.containsKey("errors")) {
421+
if (responseBody == null) {
422+
responseBuilder.append("Error encountered while trying to save blobs to TSSSaver: ").append("Response code=").append(response.statusCode());
423+
} else if (responseBody.containsKey("errors")) {
422424
responseBuilder.append("Error encountered while trying to save blobs to TSSSaver: ").append(responseBody.get("errors"));
423425
} else {
424426
responseBuilder.append("Also saved blobs online to TSS Saver.");

src/main/java/airsquared/blobsaver/app/Utils.java

+4-7
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,7 @@
6666
@SuppressWarnings("ResultOfMethodCallIgnored")
6767
final class Utils {
6868

69-
static final ButtonType redditPM = new ButtonType("PM on Reddit");
70-
static final ButtonType githubIssue = new ButtonType("Create Issue on Github");
69+
static final ButtonType githubIssue = new ButtonType("Create Issue on GitHub");
7170

7271
static final DropShadow errorBorder = new DropShadow(9.5, 0f, 0f, Color.RED);
7372
static final DropShadow borderGlow = new DropShadow(9.5, 0f, 0f, Color.DARKCYAN);
@@ -201,7 +200,7 @@ static void newGithubIssue() {
201200
}
202201

203202
static void sendRedditPM() {
204-
openURL("https://www.reddit.com/message/compose?to=01110101_00101111&subject=Blobsaver%20Bug%20Report");
203+
openURL("https://www.reddit.com/message/compose?to=01110101_00101111&subject=Blobsaver");
205204
}
206205

207206
static void openURL(String url) {
@@ -228,8 +227,6 @@ static String executeProgram(List<String> command) throws IOException {
228227
static void reportError(Alert alert) {
229228
if (alert.getResult().equals(githubIssue)) {
230229
newGithubIssue();
231-
} else if (alert.getResult().equals(redditPM)) {
232-
sendRedditPM();
233230
}
234231
}
235232

@@ -239,14 +236,14 @@ static void reportError(Alert alert, String toCopy) {
239236
}
240237

241238
static void showReportableError(String msg) {
242-
Alert alert = new Alert(Alert.AlertType.ERROR, msg + "\n\nPlease create a new issue on Github or PM me on Reddit.", githubIssue, redditPM, ButtonType.CANCEL);
239+
Alert alert = new Alert(Alert.AlertType.ERROR, msg + "\n\nPlease create a new issue on Github if you need more help.", githubIssue, ButtonType.CANCEL);
243240
resizeAlertButtons(alert);
244241
alert.showAndWait();
245242
reportError(alert);
246243
}
247244

248245
static void showReportableError(String msg, String toCopy) {
249-
Alert alert = new Alert(Alert.AlertType.ERROR, msg + "\n\nPlease create a new issue on Github or PM me on Reddit. The log has been copied to your clipboard.", githubIssue, redditPM, ButtonType.CANCEL);
246+
Alert alert = new Alert(Alert.AlertType.ERROR, msg + "\n\nThe log has been copied to your clipboard. You may create a new issue on GitHub.", githubIssue, ButtonType.CANCEL);
250247
resizeAlertButtons(alert);
251248
alert.showAndWait();
252249
reportError(alert, toCopy);

0 commit comments

Comments
 (0)