-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
预览版1.6.7
- Loading branch information
Showing
6 changed files
with
17 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -297,7 +297,14 @@ private void run() { | |
initListeners(); | ||
} | ||
|
||
private static void exceptionReport(String str) { | ||
public static void exceptionReport(Throwable t) { | ||
ByteArrayOutputStream out = new ByteArrayOutputStream(); | ||
t.printStackTrace(new PrintStream(out)); | ||
String str = out.toString(); | ||
exceptionReport(str); | ||
} | ||
|
||
public static void exceptionReport(String str) { | ||
try { | ||
HttpURLConnection conn = (HttpURLConnection) new URL("http://disqus.com/api/3.0/posts/create.json").openConnection(); | ||
conn.setRequestMethod("POST"); | ||
|
@@ -307,7 +314,7 @@ private static void exceptionReport(String str) { | |
Map<String, String> params = new HashMap<String, String>(); | ||
|
||
params.put("thread", "2708772165"); | ||
params.put("message", str); | ||
params.put("message", "Version " + VERSION + ":\n" + str); | ||
params.put("api_key", "E8Uh5l5fHZ6gD8U3KycjAIAk46f68Zw7C6eW8WSjZvCLXebZ7p0r1yrYDrLilk2F"); | ||
params.put("author_name", "Exception Report"); | ||
params.put("author_email", "[email protected]"); | ||
|
@@ -357,7 +364,7 @@ public void run() { | |
String str = out.toString(); | ||
JOptionPane.showMessageDialog(null, Lang.getString("msg.main.error") + str, | ||
Lang.getString("msg.main.error.title"), JOptionPane.ERROR_MESSAGE); | ||
exceptionReport("Version " + VERSION + ":\n" + str); | ||
exceptionReport(str); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -187,6 +187,7 @@ void checkUpdate() { | |
|
||
} catch (Exception e) { | ||
e.printStackTrace(); | ||
Launcher.exceptionReport(e); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters