Add more try and catch make sure we can get more details in errors

Former-commit-id: 68d5cc27d72754991e2bb0e963b112d590ccb1f9 [formerly 3b4acb8abaea46fbc67314bb6962eaf02c203523]
Former-commit-id: dc266afff9708e9e2537c066b4219f7513f666fb
This commit is contained in:
Ghost_chu committed 2019-09-15 12:51:31 +08:00
1 parent c748861617
commit 4996531c4e
1 file changed
+12 -5
@@ -129,11 +129,18 @@ public class Paste {
finalReport.append("\tInternal Debug Log:\n");
finalReport.append("\t\t\n").append(Util.list2String(Util.getDebugLogs()).replaceAll(",", "\n")).append("\n");
finalReport.append("\t*********************************\n");
finalReport.append("\t*********************************\n");
finalReport.append("\tlatest.log:\n");
finalReport.append("\t\t\n").append(new String(Util
.inputStream2ByteArray(new File(new File(".", "logs"), "latest.log").getPath()))).append("\n");
finalReport.append("\t*********************************\n");
try {
finalReport.append("\t*********************************\n");
finalReport.append("\tlatest.log:\n");
finalReport.append("\t\t\n").append(new String(Util
.inputStream2ByteArray(new File(new File(".", "logs"), "latest.log").getPath()))).append("\n");
finalReport.append("\t*********************************\n");
}catch (Throwable th){
finalReport.append("\t*********************************\n");
finalReport.append("\tlatest.log:\n");
finalReport.append("\t\t\n").append("Read failed.").append("\n");
finalReport.append("\t*********************************\n");
}
try {
finalReport.append("\t*********************************\n");
finalReport.append("\tbukkit.yml:\n");